troubleshooting Question

How to compare data from two different databases?

Avatar of dawes4000
dawes4000Flag for United States of America asked on
Microsoft SQL ServerSQL
6 Comments1 Solution225 ViewsLast Modified:
I have two differnet databases that have different field names, and different datatypes. I need to compare the data between these databases to find out which PK's exist or do not exist. My task is to synchronize the PK's in these tables. I have programmed a tool for the DB updates. Now, I need to find which ID's need the updates.
For example, Database A fieldname "CompanyID" (varchar 50) = Database B fieldname "custno" (char 6)
SELECT *
FROM DB A.tblCompany INNER JOIN DB B.arcust ON
A.CompanyID = B.custno
ASKER CERTIFIED SOLUTION
EugeneZ
SQL SERVER EXPERT

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros