Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select this or ALL.
Prince Of Thieves wrote:
>
> But can it be done with one variable? How do I say "Select ALL" using the
> variable? I tried:
>
> var DivCode = "*"
>
> but that didn't work.
>
> --
>
> Julian Milano
You can do this very, very easily. This is basic SQL stuff. Please consider reading the manuals (more) that are available at http://docs.oracle.com
You need to use either the 'ANY' or the 'IN' operator, and likely the NVL function to trap the case where DivCode is null.
SQL (not Oracle) uses _ and % for wild card matching, not *, and the meanings are not necessarily consistent with * that may be found in other languages. Again, this is clearly documented. Received on Fri Nov 21 2003 - 08:16:30 CST