Subject | Re: [firebird-support] strange problem with extract(month from "date") |
---|---|
Author | Arno Brinkman |
Post date | 2004-01-28T13:55:54Z |
Hi Helen,
:-)
I think you thought right, but your fingers where touching the wrong keys on
the keyboard :-))
Arno
> >You can't use NULL this way in CASE the only way to test for NULL is :Yes, but the example below is different then you wrote in the first message
>
> Arno, this works - why can't it be used?
> Here's a test case you can try on employee.fdb:
:-)
I think you thought right, but your fingers where touching the wrong keys on
the keyboard :-))
> SELECT PO_NUMBER, SHIP_DATE,Greetings,
> (CASE
> WHEN SHIP_DATE IS NULL THEN NULL
> ELSE EXTRACT (MONTH FROM SHIP_DATE)
> END) AS M,
> (CASE
> WHEN SHIP_DATE IS NULL THEN NULL
> ELSE EXTRACT (YEAR FROM SHIP_DATE)
> END) AS Y
> FROM SALES
> WHERE PO_NUMBER IN ('V9346200', 'V9345200');
Arno