Results 1 to 2 of 2
Thread: problem with sql?
Feb 1, 2005, 08:51 #1
problem with sql?
I'm using the following sql statement on an Postgresql 7.4 database. But none of the joined info is showing from tbl98 and tbl99. If I remove the
AND tbl97.col22=0 AND tbl98.col22=0
AND tbl99.col22=0 AND tbl98.col22=0
from the join statements it shows all the records fine. I've double checked all the col22 in all three tables and they all equal 0. So I'm not sure why they're not showing up.
LEFT JOIN tbl98 ON tbl97.col1 = tbl98.col2 AND tbl97.col22=0 AND tbl98.col22=0)
LEFT JOIN tbl99 ON tbl98.col1 = tbl99.col2 AND tbl99.col22=0 AND tbl98.col22=0
Feb 1, 2005, 08:55 #2
Sorry, i think it's working fine. I just had to reload some code.