November 6, 2009 at 9:13 am
I have a query that runs fine, but I need to get the matching loan number from another DB.
select
zone,
data_date,
loan,
altloannumber,
oldloannumber
from loandata
where data_date > '2009-11-06'
order by loan
I need to get the matching loan # (called borrowerid) from a different DB on the same server called LPB_ReportingServices. Not sure of the syntax..
November 6, 2009 at 10:37 am
krypto69 (11/6/2009)
selectzone,
data_date,
loan,
altloannumber,
oldloannumber
from loandata
where data_date > '2009-11-06'
order by loan
I need to get the matching loan # (called borrowerid) from a different DB on the same server called LPB_ReportingServices. Not sure of the syntax..
select
zone,
data_date,
loan,
altloannumber,
oldloannumber
from loandata T1
JOIN <OTHERDB>.<schema>.<TableName> T2
ON T1.BorrowerID = T2.BorrowerID
where T1.data_date = '2009-11-06'
order by loan
Does this help?
---------------------------------------------------------------------------------
November 6, 2009 at 11:20 am
Thank man...
It's saying invalid column name borrowerid
November 6, 2009 at 11:35 am
then that column is not there in either of the table .. identify the columns you want to join the tables on first!
---------------------------------------------------------------------------------
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply