Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding almost duplicates from a UNION
Message
From
28/06/2001 12:08:47
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:
00524772
Views:
27
Use GROUP BY Purno.

Hilmar.

>Ok, is seems like I knew how to do this, but for some reason, I'm just not making the right connections this morning. :) I have this union:
>
>
>SELECT purno, potype, purdate, currid, postat, puramt, recamt, vendno, company, "C" AS chfile ;
>  FROM a_pomast ;
>  INTO CURSOR ac_pomast ;
>UNION ;
>SELECT purno, potype, purdate, currid, postat, puramt, recamt, vendno, company, "H" AS chfile ;
>  FROM a_poymst
>
>
>There are some records that are in both tables. Normally, they would be filtered out as duplicates. But because I added that extra field to tell me which table they came from, they're showing up as unique. How do I tell it to filter duplicates based just on the purno?
>
>Thanks,
>
>Michelle
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