November 6, 2002 at 9:25 am
Can I do 2 left joins in 1 sql statement?
select c.*, r.disease new_dis,e.employer_name
FROM
dbo.Central_fact_Table c
left join dbo.Disease_Final_Resolved r
on r.member_id = c.member_id
left join dbo.eligibility e on
e.elig_tag=c.elig_tag
November 6, 2002 at 9:33 am
Yes.
November 6, 2002 at 7:56 pm
I second that. Yes, you can. I am doing it now in a view I created.
November 7, 2002 at 4:29 am
You can do as many join as you need to build a query set. However the more work there is to do the slower it can get, so I suggest if you don't need all the joins in every query but there is a set that does get used frequently, make it a view to itself and then join the view to other pieces in the query. Now as far as what you have should work a long as the object match what is in your database, just run it and see what happens.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply