Subject Re: [firebird-support] Problem with query parameter
Author Alan.Davies@aldis-systems.co.uk
He didn't mention any SPs. I accept that you can do that, but what is
the performance like with these either/or statements? And what about
indexes with nulls? I work from the idea that nulls "are a bad thing!"
and always provide a sensible default if required. Still, we're all
different.
Regards
--
Alan J Davies
Aldis



Quoting Anderson Farias <peixedragao@...>:

> Hi,
>
>> No it isn't possible,
>
> YES, it is possible!
>
>
>> You can't select anything from a table based on a parameter you are
>> setting if that parameter is null. What do you expect back??
>
> Sorry, but this is wrong. I aways do that on my SPs and it works perfectly.
>
> He is saying he wants ALL records when passing a null param *OR* only
> records where some field match the param otherwise.
>
>
>> select * from TABLE
>>> where FIELD = :param or :param is null
>
> How exactlty are you executing this? Is it inside some SP or Trigger??
>
> Regards,
> Anderson Farias
>
>
>