dbTalk Databases Forums  

Left Join Problem

microsoft.public.sqlserver.clustering microsoft.public.sqlserver.clustering


Discuss Left Join Problem in the microsoft.public.sqlserver.clustering forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel
 
Posts: n/a

Default Left Join Problem - 03-22-2005 , 09:08 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

Thanks

Reply With Quote
  #2  
Old   
Mike Epprecht (SQL MVP)
 
Posts: n/a

Default RE: Left Join Problem - 03-23-2005 , 05:11 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

"Daniel" wrote:

Quote:
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

Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.