Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Select -SQL
Message
From
28/03/2001 10:27:22
 
 
To
28/03/2001 10:21:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00489429
Message ID:
00489435
Views:
9
I want to use a select statement to populate a cursor and report from the cursor. In the select statement I want some of the values to be 'DISTINCT' but not all. For example:

mytable

fld1 fld2 fld3 fld4

abc def ghi jkl
abc def ghi jkm
abc ded ghi jkl

I want all of these fields to go into the cursor so they can be used in the report. But the only records I want to go into the cursor are 1 and 2 because I only want DISTINCT to apply to fld1 and fld2.

***********************************************************************
Sorry about the error above: I meant I want records 1 and 3 not 1 and 2
***********************************************************************

Actual code:
SELECT DISTINCT FLD1, FLD2, FLD3, FLD4 FROM MYTABLE INTO CURSOR MYCURSOR

(my problem is that this code selects all 3 records not just the 2 with DISTINCT FLD1 AND FLD2) Thanks for any help
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform