saravanakumar
Member
Hi Everybody,
Below is my requirement;
say after joining 2 tables customer & order i have 3 fields in the result set as follows;
1. Customer ID
2. Customer Name
3. Order Number
Pre-Requisites:
1. In order table Order number is not unique, it may repeat
Now i need to Break By Order number but should be sorted based on customer id and then by order number.
Please validate the below solution and let me know if there is a better way,
FOR EACH customer,
EACH order BREAK BY NAME:
IF FIRST-OF(NAME) THEN
DO:
/** populate the value to a temp-table; say newTable */
END.
END.
FOR EACH newTable BY customerid:
/** display the records now **/
END.
Below is my requirement;
say after joining 2 tables customer & order i have 3 fields in the result set as follows;
1. Customer ID
2. Customer Name
3. Order Number
Pre-Requisites:
1. In order table Order number is not unique, it may repeat
Now i need to Break By Order number but should be sorted based on customer id and then by order number.
Please validate the below solution and let me know if there is a better way,
FOR EACH customer,
EACH order BREAK BY NAME:
IF FIRST-OF(NAME) THEN
DO:
/** populate the value to a temp-table; say newTable */
END.
END.
FOR EACH newTable BY customerid:
/** display the records now **/
END.