IS there anything wrong with the query?

gtmsb

Member
Output to "C:\Documents and Settings\seeming\Desktop\A.txt".
FOR EACH pt_mstr NO-LOCK
WHERE pt_status = "AC" and pt_prod_line= "RMCB" and in_qty_oh > 0,
EACH in_mstr NO-LOCK
WHERE in_part = pt_part
:
DISP
pt_part COLUMN-LABEL "PART NUMBER IN SYSTEM"
in_qty_oh COLUMN-LABEL "TOTAL QOH".
END.
output close.
 
Hi
1. The (and in_qty_oh >0 ) should be in the "each in_mstr" scope.
2. You also have to reference the site. If you do not know, you can use pt_site .

Output to "C:\Documents and Settings\seeming\Desktop\A.txt".
FOR EACH pt_mstr NO-LOCK
WHERE pt_status = "AC" and pt_prod_line= "RMCB",
EACH in_mstr NO-LOCK
WHERE in_part = pt_part and in_site = pt_site and and in_qty_oh > 0
:
DISP
pt_part COLUMN-LABEL "PART NUMBER IN SYSTEM"
in_qty_oh COLUMN-LABEL "TOTAL QOH".
END.
output close.


____________________________________
Max Viskov
Senior Consultant, Implementation Services
MFG/PRO Toronto User Group Board Member
32Soft Inc., an Official QAD Subcontractor
Need to extract MFG/PRO documents to Excel and Acrobat?
Free Tools at http://www.32soft.com/site/modules/xt_conteudo/index.php?id=12[FONT=&quot][/FONT]
 

gatsbyinca

New Member
Although you may not want to specify site in your query if inventory exists in more than one site. In this case, include in_site as a display field.

One other thing for eB2.1, you may want to include domain in your query.
 
Top