Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excluding almost duplicates from a UNION
Message
De
29/06/2001 11:22:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00524751
Message ID:
00525208
Vues:
19
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform