Re: SQL UNION Question (or not UNION?)



<johnrou@xxxxxxxxxxxxxxxxxx> wrote in message
news:1165862844.468850.117340@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Note that if you have duplicates across the tables you'll now see
both of them since the 'fromtable' field will be different
Anyway to get rid of the DUPS short of writing my own loop?

If you have dups in table 1 you want to ignore them and flag the distinct
ones as being from table 1. The same is true for dups within table 2. If
you have the same record in both table do you want the one from table 1, the
one from table 2 or the data flagged as 'both'?

Whatever the answer is it's going to require more than a simple query. You
can do it in code or you could possibly use temp tables to massage the data
to boil it down to what you want. In order to get a specific answer you
need to define how to handle the cross-table duplicates.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

.



Relevant Pages


Loading