Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare data from two databases

Status
Not open for further replies.

perelo

Technical User
Sep 14, 2005
24
SE
I have got 2 databases on the same server, I want to compare data from one column in each database.
The statement this far looks like this:

SELECT * from main
WHERE record_id NOT like ......and this is where`I´m lost, how do I tell the script to look in the other database?

I´ve tried this without any luck:

SELECT * from main
WHERE record_id NOT like [CMGVoice] users.dbo cmgrecid


Sincerly, Per

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top