thedaveg155
asked on
Compare two columns in different tables and extract difference between them
I am using MS-SQL Query Analyser.
I have two tables ("A" & "B") that both have a column named "X". Both columns contain the same type of information. There are some differences betwen the contents of the 2 columns.
In particular, Table A col X contains a list of approx 100000 distinct numbers. Table B col X contains approx 1 million numbers (not distinct).
I need to find out which numbers in table B col X do not exist in table A col X. Help please!!!!!! Thank you!
I have two tables ("A" & "B") that both have a column named "X". Both columns contain the same type of information. There are some differences betwen the contents of the 2 columns.
In particular, Table A col X contains a list of approx 100000 distinct numbers. Table B col X contains approx 1 million numbers (not distinct).
I need to find out which numbers in table B col X do not exist in table A col X. Help please!!!!!! Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can ask 0-point question in a Community Support for refunding points :)
This question has been answered by the asker.
mlmcc
DB Reporting Tools PE
mlmcc
DB Reporting Tools PE
Select X from B
MINUS
Select X from A;