Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL statement under FPW 2.6
Message
From
06/04/1998 13:38:44
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00089895
Message ID:
00089899
Views:
37
>I need a SQL statement that will select a list of UNIQUE endors from a table and order them by last pay date. I am pulling the VENDID, VENDNAME, INVNUM, CHKNUM,CHKDATE,DTOS(CHKDATE), and CHKAMOUNT from a single table (CD). A simple select distrinct will not work because each vendor has multple records for different INVNUM's. Help Please

Select * From vendors Into cursor tmp order by vendid,chkdate
Select * From tmp Group by vendid
BTW, your table structure implies that you better divide your table into two:
1. Vendors: vendid,name
2. Invoices: vendid,invnum,date
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform