You are here: Re: search on concatenated fields in sql server « MsSQL Server « IT news, forums, messages
Re: search on concatenated fields in sql server

Posted by Simon Hayes on 10/01/15 11:27

michaelnewport@yahoo.com wrote:
> Simon Hayes schreef:
>
>
>>If you got no rows, is it possible that your subquery result included a
>>NULL? NOT IN combined with a NULL returns an empty set; NOT EXISTS
>>returns all the non-NULL values. Google for 'sql "not in vs not
>>exists"' or something similar and you'll find plenty of discussions
>>about this.
>>
>>Simon
>
>
> I owe you some beer !
> I found some NULL values and some other things I didn't expect, but I'm
> still digesting....
>
> I see (from your example and my practice) that I can only do 1 INNER
> JOIN statement per table and the rest of the joins on that table are
> back to 'old style'. Is there a good reason for that ?
>

The query I posted is a correlated subquery, not a join (as Erland
noted) - see "Correlated Subqueries" in Books Online. But the beer would
still be welcome :-)

Simon

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация