Subject | Re: [IBO] query with NULL parameters |
---|---|
Author | Daniel Rail |
Post date | 2002-02-28T20:41:27Z |
At 28/02/2002 04:36 PM, you wrote:
matching your request, even those with NULL.
If you want to modify the WHERE clause of a query, then use the
SQLWhereItems property to easily modify the WHERE clause. And, I normally
do this within the OnPrepareSQL event.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)
>I have a query like this:The NULL parameters are taken into consideration and return the records
>
>select * from table1 where field1=:param1 and field2=:param2 and .... and
>fieldN=:paramN
>
>While the SQL text takes into account all the possible filters, very seldom
>I need to use them all.
>
>I wonder what happens if some parameters are left NULL.
>
>Will the query still work w/o taking into account the NULL parameters ?
matching your request, even those with NULL.
If you want to modify the WHERE clause of a query, then use the
SQLWhereItems property to easily modify the WHERE clause. And, I normally
do this within the OnPrepareSQL event.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)