I am performing a union query, and the fields and datatypes match up and I produce output. My problem is that I sometimes get exact duplicate records, I would like to eliminate these.
The data I want could be in either of 2 tables, if it is not in the first one then I want to look in the second one to see if it is there. I thought a union would be a good way to get this data, and it is, I just want to eliminate the exact duplicates.
I know I could dump my query results into a temp table and then perform a Select Distinct on that table but I would prefer to get the results in one query.
I would appreciate any suggestions, thanks.
The data I want could be in either of 2 tables, if it is not in the first one then I want to look in the second one to see if it is there. I thought a union would be a good way to get this data, and it is, I just want to eliminate the exact duplicates.
I know I could dump my query results into a temp table and then perform a Select Distinct on that table but I would prefer to get the results in one query.
I would appreciate any suggestions, thanks.