Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sammusa
Starting Member
1 Post |
Posted - 2005-09-30 : 17:27:48
|
| Hi I am new to SQL and I have a unique needI have 2 DB on the same machine DB 1 is called Test1 and DB 2 is called Test2I want to be able to write one query to compare 2 tables from each of the Databases.I wrote the first query ie,use TestSELECT Unit_Identifier,Piece_Id,Piece_CountFROM Piece_Unitwhere Version_Date = '01/01/2005' order BY Piece_Idand I get the result from the Piece_unit TableI wrote another query ieuse Test1SELECT Piece_Id,PieceName,Insertsfrom PalletDetailsWHERE VersionDate = '01/01/2005' ORDER BY Piece_Idand I get the result from the PalletDetails tableThe piece_id of both Tables are same valueI 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 onlyThanks |
|
|
nathans
Aged Yak Warrior
938 Posts |
|
|
|
|
|