We help IT Professionals succeed at work.

VB.Net SQL Query 2 Tables Different Databases

Jimbo99999
Jimbo99999 asked
on
367 Views
Last Modified: 2017-03-29
Good Day Experts!

I find myself in a bit of a jam here.  Long story short I need help with a query in which I need to join a table in a different database using data on the record from the first table.

Invoice --> 1234
Account --> ABC0101
Table --> Staging
DataBase --> A

Orders --> multiple records
Invoice --> 1234
Database --> ABC0101
Table --> Orders

I am having trouble figuring out how to use the Account data from Staging table as the Database for the second table so I can join on Invoice.

Is this possible? Databases are on the same server.

Thansk,
jimbo99999
Comment
Watch Question

Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer / Applications Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Senior .Net Consultant
CERTIFIED EXPERT
Top Expert 2016
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Richard LeeSoftware Enthusiast
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.