Subject | [firebird-support] Re: coalesce and case does not work in firebird 1.5 ?? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-11-03T07:21:18Z |
Since you and Antonio gets a different result, that means that the problem could well be in the code of your stored procedure, Yannis. So, I'd say the source code of your stored procedure (at least the interesting parts, and that should be more than just parts of the SQL statement) is what is missing. What we basically need to be of any help, is a way to reproduce your problem, and Antonio showed that just using the sql statement doesn't cause any problem.
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of jvpgr
Sent: 3. november 2008 00:41
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: coalesce and case does not work in firebird 1.5 ??
--- 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
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of jvpgr
Sent: 3. november 2008 00:41
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: coalesce and case does not work in firebird 1.5 ??
--- In firebird-support@yahoogroups.com, "Antonio Galicia"
<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