Help Help New Qith SQL
Sep 30, 2005Hi
I am new to SQL and I have a unique need
I have 2 DB on the same machine DB 1 is called Test1 and DB 2 is called Test2
I want to be able to write one query to compare 2 tables from each of the Databases.
I wrote the first query ie,
use Test
SELECT Unit_Identifier,Piece_Id,Piece_Count
FROM Piece_Unit
where Version_Date = '01/01/2005' order BY Piece_Id
and I get the result from the Piece_unit Table
I wrote another query ie
use Test1
SELECT Piece_Id,PieceName,Inserts
from PalletDetails
WHERE VersionDate = '01/01/2005' ORDER BY Piece_Id
and I get the result from the PalletDetails table
The piece_id of both Tables are same value
I want to combine both queries to a single query and ONLY list the difference from both Tables in reference to the piece_id ( Only list piece_id) that exist on either table only
Thanks