Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another SQL Question
Message
From
23/01/2002 19:31:21
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00609453
Message ID:
00609457
Views:
14
Hi Kevin,

I think the following may be want you want:
SELECT DISTINCT EntryDate, BatchId;
   FROM Resh;
   ORDER BY EntryDate ;
   INTO CURSOR Temp1
or
SELECT EntryDate, BatchId;
   FROM Resh;
   GROUP BY EntryDate, BatchId ;
   ORDER BY EntryDate, BatchId ;
   INTO CURSOR Temp1
Hope this helps,
Gavin...

>How do I select out all records with a distinct combination of 2 fields?
>
>SELECT EntryDate, BatchId;
>  FROM Resh;
>  ORDER BY EntryDate;
>  INTO CURSOR Temp1
>
>
>This gives me ALL records. I just want the records where the combination
>of the 2 fields are unique.
>
>Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform