Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
anishap
Yak Posting Veteran
61 Posts |
Posted - 2009-09-03 : 13:14:53
|
I'm trying to join 3 tables using right outer join. I got the below error message Syntax error missing operator in query field 'AS e ON e.eid = r.eid RIGHT OUTER JOIN Fittest f on e.eid = f.eid'I need all rows from Respirator table, Fittest table based on the EID from resident_2009 tableSELECT e.eid, e.lname, e.fname, r.date AS Resp_date, r.n95mask, f.date AS fit_date, f.respirator, f.resultFROM respirator AS r RIGHT JOIN Resident_2009 AS e ON e.eid = r.eid RIGHT OUTER JOIN Fittest f on e.eid = f.eid;Can anyone help me on this? |
|
anishap
Yak Posting Veteran
61 Posts |
Posted - 2009-09-03 : 13:22:42
|
I think it worked using the below querySELECT e.eid, e.lname, e.fname, r.date AS Resp_date, r.n95mask, f.date AS fit_date, f.repirator, f.resultFROM (respirator AS r RIGHT JOIN UWMC_Resident_2009 AS e ON e.eid = r.eid) left JOIN Fittest f on e.eid = f.eid; |
 |
|
|
|
|
|
|