Subject Re: [firebird-support] About input params in stored procedure and where clause
Author Sławek Cabaj
Thanks Marco!





________________________________
From: marco bianchini <informarco@...>
To: firebird-support@yahoogroups.com
Sent: Thu, July 1, 2010 12:51:04 PM
Subject: Re: [firebird-support] About input params in stored procedure and
where clause


where (:param1 is null or column1 = :param1)
hth

2010/7/1 SÅ‚awek Cabaj <scabaj@...>

>
>
> Hello,
> The case is like that:
> A stored proc has some input params: column_1_param, column_2_param etc
> Params may have a value (int, date, varchar) or may be set to null;
>
> I'd like to use them in where clause of select statement inside the proc
> something like that
> ...
> where column1 = column_1_param and ...
>
> but when column_1_param is set to null I get
> ...
> where column1 = NULL ...
>
> but in such situation I'd like to accept all records from column1
>
> Any hints, please ?
>
> [Non-text portions of this message have been removed]
>
>
>

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]