General information
Category:
Coding, syntax & commands
>Using the scan still got me 6 records instead of 2 (2 records for every customer with dups-3).I need it to grab one customer from cursor dups, select all it's duplicate records into table c:\temp, process, then go on to the next customer in cursor dups. Now it's grabbing all the customers in dups, selecting all the duplicate records for those 3 customers into table c:\temp.
>
The outline for code like this should be:
SELECT to get the dups into cursor Dups
SELECT Dups
SCAN
m.CustId = Dups.CustId
SELECT * FROM Dups ;
WHERE Dups.CustId = m.CustId ;
INTO Cursor Temp
SELECT Temp && not really needed, but here for clarify
SCAN
* Process records in Temp
ENDSCAN
ENDSCAN
I suspect your second query also needs to join with the original table, but I wasn't sure exactly what you're doing.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only