Home All Groups Group Topic Archive Search About
Author
28 Mar 2007 12:06 AM
Joe
I am trying to pull together information from two different Linked Server
databases.

Let's call the LinkedServerA and LinkedServerB, both of which are Oracle
databases.

So, what I want to do is pull the following Columns from LinkedServerA:
ANUMBER, FNAME, LNAME, C_ID, S_ID, STATE

And from LinkedServerB I want to pull one Column
CCH

The Join is on LinkedServerA.ANUMBER = LinkedServerB.ANUM_EXTERN

For the life of me I can't get the statement correct.

Here's what I have
SELECT LSA.ANUMBER, LSA.FNAME, LSA.LNAME, LSA.C_ID, LSA.S_ID, LSA.STATE,
LSB.CCH
FROM LinkedServerA..ConnectingUser LSA
JOIN LinkedServerB..ConnectingUser LSB
ON LSA.STATE = LSB.ANUM_EXTERN
WHERE LSA.STATE = 'VALUE';

Where have I gone wrong?

AddThis Social Bookmark Button