How to find first order (1 Viewer)

shaomwang

Registered User.
Local time
Today, 10:51
Joined
Apr 22, 2000
Messages
14
I need code to find first order which meet the condition basing on the following table.
COMPANY PRODUCT_ID ORDERDATE FIRST_ORDER---
------- ---------- ---------- --------------
AAAAAAA 1111111111 5/20/2000
AAAAAAA 1111111111 3/20/2000
BBBBBBB 3333333333 3/15/2000
AAAAAAA 1111111111 2/20/2000 F
BBBBBBB 3333333333 1/25/2000 F
BBBBBBB 3333333333 3/25/2000
If the same company and ordered the same product, the earlier date is ther first order. I need code to input "F" at FIRST_ORDER field. In this case, only the fourth and fifth record is "F".
Supposing there are 50,000 records in this table.




[This message has been edited by shaomwang (edited 11-13-2000).]
 

Users who are viewing this thread

Top Bottom