Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding almost duplicates from a UNION
Message
From
29/06/2001 11:22:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00524751
Message ID:
00525208
Views:
18
Sometimes it is easier - among others, for debugging purposes - to separate a single SQL - SELECT command into several.
SELECT ... (union goes here) ... into cursor Tmp nofilter
SELECT * from Tmp into cursor Tmp group by MyField
Yes, you can (usually) send the result from cursor Tmp back into cursor Tmp! However, again for debugging purposes, you may want to keep a separate cursor.

Regards, Hilmar.


>I don't know. Maybe I put it in the wrong spot? I thought maybe the group by was just applying to one of the selects and not the whole union. At any rate, it didn't eliminate the duplicates.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform