philsivyer
Technical User
Example...... initial data set
oc_id customer_id order_no expire_date
10 001 0123 01/01/2004
10 001 0124 01/01/2005
10 001 0125 01/01/2006
11 002 4567 01/01/2005
11 002 6789 01/01/2007
Now to build a script with the following rules.....
I would like to group by oc_id then customer_id but only return data in a group where the expire_date is <= today.
Although - not grouping on order_no - I still want to see the order numbers and expire dates within those two groups.
So, when the script is run it would only return the following.....
oc_id customer_id order_no expire_date
10 001 0123 01/01/2004
10 001 0124 01/01/2005
10 001 0125 01/01/2006
Note: I do not want this
oc_id customer_id order_no expire_date
10 001 0123 01/01/2004
10 001 0124 01/01/2005
10 001 0125 01/01/2006
11 002 4567 01/01/2005
Hope this makes sense and your help much appreciated
Thanks
Phil
oc_id customer_id order_no expire_date
10 001 0123 01/01/2004
10 001 0124 01/01/2005
10 001 0125 01/01/2006
11 002 4567 01/01/2005
11 002 6789 01/01/2007
Now to build a script with the following rules.....
I would like to group by oc_id then customer_id but only return data in a group where the expire_date is <= today.
Although - not grouping on order_no - I still want to see the order numbers and expire dates within those two groups.
So, when the script is run it would only return the following.....
oc_id customer_id order_no expire_date
10 001 0123 01/01/2004
10 001 0124 01/01/2005
10 001 0125 01/01/2006
Note: I do not want this
oc_id customer_id order_no expire_date
10 001 0123 01/01/2004
10 001 0124 01/01/2005
10 001 0125 01/01/2006
11 002 4567 01/01/2005
Hope this makes sense and your help much appreciated
Thanks
Phil