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 |
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2011-08-12 : 07:49:00
|
I have a simple select statement that works fine unless the value in the joined table is NULLSELECT a.Col1, a.Col2, b.join1, b.join2FROM tbl1 aINNER JOIN jnTbl b ON b.dist = a.distWhere a.ID = @paramNow, b.dist may be NULL and it that's the case, nothing is returned.But I need the rest of the values.I have tried adding in the JOIN OR b.dist IS NULL but that won't work.Any suggestions?Thanks. |
|
Zath
Constraint Violating Yak Guru
298 Posts |
Posted - 2011-08-12 : 07:52:09
|
Ok, I got it.A LEFT OUT JOIN did it.Sometimes I forget sql LOL...... |
 |
|
|
|
|