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 |
|
matthisco
Starting Member
48 Posts |
Posted - 2009-10-13 : 06:27:08
|
| Hi Folks, I have a basic sql statment that only returns results that exists in the delcinereason table also.Select * from clinicsINNER JOIN declinereason ON clinics.reason = declinereason.id order by nameCan anyone please tell me how I can show all the rows in the clinics table, and data from the declinereason if it exists?Thanks in advance |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-10-13 : 06:29:09
|
| Select * from clinicsLEFT JOIN declinereason ON clinics.reason = declinereason.id order by name |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-10-13 : 06:58:23
|
| go through this linkhttp://www.sqlteam.com/article/writing-outer-joins-in-t-sql |
 |
|
|
matthisco
Starting Member
48 Posts |
Posted - 2009-10-14 : 04:29:57
|
| Many thanks |
 |
|
|
|
|
|