Subject | Re: coalesce and case does not work in firebird 1.5 ?? |
---|---|
Author | jvpgr |
Post date | 2008-11-02T23:40:42Z |
--- In firebird-support@yahoogroups.com, "Antonio Galicia"
<antonio.galicia@...> wrote:
nothing is missing, you are ussing the IBSQL utility and I am ussing
an external debug table to see the results since in my case the select
(see my answer to Helen) is inside a Stored Procedure
Yannis
<antonio.galicia@...> wrote:
>Antonio,
> On Fri, Oct 31, 2008 at 3:44 PM, jvpgr <jvpgr@...> wrote:
>
> >> COALESCE WORK_HOURS CASE
> >> ============ ============ ============
> >> 0 <null> 0
> >> 2 2 2
> >> 0 <null> 0
>
> > no, you don't get nothing strange, you get exactly what you should,
> > the problem is that I get only nulls in all fields when the table is
> > empty, to my opinion only the work_hours field should have been null
> > and not the coalesce & case ones too. The other fields value should
> > have been 0
>
> ??
>
> If the table is empty I get no result:
>
> SQL> delete from resource_allocation;
> SQL> commit;
> SQL> select coalesce(work_hours, 0), work_hours,
> CON> case when work_hours is null then 0 else work_hours end
> CON> from resource_allocation;
> SQL>
>
> What is missing?
>
> --
> Saludos,
> PP
> -----------------------------------
> Soy Borracho, no alcohólico
> Los alcohólicos van a reuniones
>
nothing is missing, you are ussing the IBSQL utility and I am ussing
an external debug table to see the results since in my case the select
(see my answer to Helen) is inside a Stored Procedure
Yannis