Re: Simulating wildcard for Numeric database types
- From: Lulu58e2 <cwmaguire@xxxxxxxxx>
- Date: 30 May 2007 11:52:03 -0700
On Apr 27, 8:46 am, goykhmanster <goykhmans...@xxxxxxxxx> wrote:
Hi
I have a query that is expecting multiple numeric parameters, and I am
trying to make it generic enough so that if any of these numeric
parameters is not provided, i can still execute the query and get all
matches as if i'm using '%' for a Varchar parameter.
I'm not saying this is right, optimal or good, but I use:
where mySearchValue = -1 or my_column = mySearchValue
If the search value is -1 (or whatever default you choose) then the
records are not filtered. If the search value is not the default, then
the records are filtered.
Granted, I haven't used it with massive queries but it seem to work
alright.
C>
.
- Prev by Date: Re: Map entity to multiple tables in multiple databases
- Next by Date: Re: Best way to check oracle database server / services is alive using Java
- Previous by thread: Re: Simulating wildcard for Numeric database types
- Next by thread: Re: Best way to check oracle database server / services is alive using Java
- Index(es):
Relevant Pages
|
|