Subject Re: [firebird-support] Re: coalesce and case does not work in firebird 1.5 ??
Author Antonio Galicia
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