Subject | "All" parameter variable |
---|---|
Author | rodbracher |
Post date | 2003-10-20T10:58:48Z |
Hi
If I had a query
select * from mytable where mydate = :date
There is often the case you want to consider all dates. This would
essentially mean removing the where condition - but it would be
easier to have the query "know" to ignore that parameter if some
symbol is passed in.
This is a rather simple case, but when you have many parameters -
each one being an option to use or not - it is a pain building SQL in
code to cater for all permutations.
Is there such a thing ?
FB 1.0.3
Thanks
Rod
If I had a query
select * from mytable where mydate = :date
There is often the case you want to consider all dates. This would
essentially mean removing the where condition - but it would be
easier to have the query "know" to ignore that parameter if some
symbol is passed in.
This is a rather simple case, but when you have many parameters -
each one being an option to use or not - it is a pain building SQL in
code to cater for all permutations.
Is there such a thing ?
FB 1.0.3
Thanks
Rod