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