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)
[Back to original message]
|