I have two simple sql statements that I need to join...how would I do that?
P.SEQUENCE is the same as D.SEQUENCE
AND P.BILL is the same as M.IDENT
Here are the statements:
SELECT P.BILL, P.SEQUENCE, P.LOCATION, P.TYPE
FROM dbo.POLICY P
WHERE P.BILL = '24680'
SELECT M.IDENT, D.SEQUENCE, I.IDENT, S.IDENT, D.*
FROM BILL M (NOLOCK),
INVOICE I ,
STATUS S ,
STATUSDETAIL D
WHERE M.IDENT = '24680'
AND I.IDENT = '13579'
AND I.BILL = M.IDENT
AND S.INVOICE = I.IDENT
AND D.STATUS = S.IDENT
Start Free Trial