Link to home
Start Free TrialLog in
Avatar of Tagom
Tagom

asked on

join two tables from two different databases

I have two databases - same server
I need to create a join of datasource1.customer and datasource2.payments - joined on an account number.
How would I do this .
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SELECT datasource1.customer.field1,datasource1.customer.field2,datasource1.customer.field3,datasource1.customer.field4*, datasource2.payments *
FROM datasource1.customer INNER JOIN Orders ON datasource1.customerCustomerNo =
datasource2.payments..CustomerNO
Thanks for the split.  Good luck with your project.  -Jim