You are here: Re: Narrowed Down Search « MsSQL Server « IT news, forums, messages
Re: Narrowed Down Search

Posted by Chris.Cheney on 05/10/07 07:54

Looch <lucianoj2005@yahoo.com> wrote in news:1178739215.805604.182750
@y5g2000hsa.googlegroups.com:

> Hi All,
>
> I'm trying to write a query that gets more granular as criteria is
> available. for example:
>
> select name where A is true, B MIGHT be true and C MIGHT be true.
>
> Is that possible? The idea is that the more information available the
> smaller the size of the dataset.
>
> Thanks for any input.
>

Perhaps something like

SELECT name FROM atable WHERE ColA = ValueA AND ColB = COALESCE(@B, ColB)
AND ColC = COALESCE(@C, ColC)

 

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

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