Subject | Re: [firebird-support] Using COALESCE in firebird |
---|---|
Author | Helen Borrie |
Post date | 2005-02-11T03:25:12Z |
At 02:54 PM 11/02/2005 +1300, you wrote:
create procedure blah
as
declare variable returns aValue integer;
begin
select COALESCE(tbltest.id,0) from tbltest
where
tbltest.first_name='doppy'
and
tbltest.last_name='draws'
into :aValue;
...
end
Or perhaps you're not using Firebird 1.5?
./hb
>Hi,In a SP, you need variables to select your output into, e.g.
>
>can anybody please expalin why I can't use the "COALESCE" function in
>firebird.
>
>I am trying to accomplish the following statement in a stored procedure.
>
>select COALESCE(tbltest.id,0) from tbltest
>where
> tbltest.first_name='doppy'
> and
> tbltest.last_name='draws'
>
create procedure blah
as
declare variable returns aValue integer;
begin
select COALESCE(tbltest.id,0) from tbltest
where
tbltest.first_name='doppy'
and
tbltest.last_name='draws'
into :aValue;
...
end
Or perhaps you're not using Firebird 1.5?
./hb