TCL List Grouping (AREV Specific)
At 08 APR 2002 02:32:07AM Troy Griffiths wrote:
Hi,
Another simple question (I am sure) - anyhow:
Using the TCL prompts I am selecting lines, from a table, then listing those lines, however I want to group the lines by a field in the table
Eg LIST DAILY_JOB BY CUST_CD BREAK-ON CUST_CD TOTAL LN_TOT
It is in the above example where I want the have one line per Customer Code.
What is the "group by" command?
Thanks, again, in advance for any assistance you can offer!
Regards
Troy
At 08 APR 2002 03:57AM Richard Hunt wrote:
Change the sentence from…
LIST DAILY_JOB BY CUST_CD BREAK-ON CUST_CD TOTAL LN_TOTto…
LIST DAILY_JOB BY CUST_CD BREAK-ON CUST_CD "'V'" TOTAL LN_TOT DET-SUPPYou might want to also add "ID-SUPP".
At 11 APR 2002 02:50AM Troy Griffiths wrote:
Thanks for that! Brilliant.
But what does the "V" do?? As all I got in the CUST_CD fields were "V" when this should/ideally be the CUST_CD.
Just for my own knowledge is SUP-DET and SUP-ID supress the Detail and ID fields?
Other than that it is perfect…
Thanks again!
Troy
At 11 APR 2002 11:11AM Don Miller - C3 Inc. wrote:
But what does the "V" do?? As all I got in the CUST_CD fields were "V" when this should/ideally be the CUST_CD.
The syntax to insert the break-on value is probably incorrect:
BREAK-ON CUST_CD "'V'" … ⇐ note the double/single quote pairing. If you're doing this programatically, then it's a little hairier:
CMD:= BREAK-ON CUST_CD "':"'V'":'"' to imbed the proper quotes
Just for my own knowledge is SUP-DET and SUP-ID supress the Detail and ID fields? DET-SUPP is only useful when you're totalling or using a BREAK-ON with a value item or both. If you have a whole pile of the same CUST_CD and you only want to see one of them without the details, then DET-SUPP will do that. If you're totalling some fields(s) then the BREAK-ON CUST-CD "'LV'" TOTAL SOMEFIELDS DET-SUPP will condense the report and omit the extra blank line. You'll just get the customer code and totals and a grand total at the end.
HTH
Don Miller
C3 Inc.
At 11 APR 2002 07:27PM Troy Griffiths wrote:
Great. Thank you all.