Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with cursor and temp table
Message
From
15/02/2002 09:36:48
 
 
To
14/02/2002 14:50:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00620192
Message ID:
00620631
Views:
21
>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
Map
View

Click here to load this message in the networking platform