Groups | Blog | Home
all groups > sql server clustering > march 2005 >

sql server clustering : Left Join Problem


Daniel
3/22/2005 7:08:23 PM
We would like to restrict the number of records returned
in a LEFT JOIN query but we find that it doesn't work as
it supposed to be.

Query:

select t1.statdescr
from table1 as t1 with (nolock)
left join table2 as t2
on t1.tpklrpap = t2.tfklrpap
and t1.statdescr not like 'CANCEL%'

However, we find that it still pulls those records with
CANCEL

Mike Epprecht (SQL MVP)
3/23/2005 3:11:03 AM
Hi

select t1.statdescr
from table1 as t1 with (nolock)
left join table2 as t2
on t1.tpklrpap = t2.tfklrpap
WHERE t1.statdescr not like 'CANCEL%'

Regards
Mike

[quoted text, click to view]
AddThis Social Bookmark Button