Re: SQL Default Return
From: Oradba Linux <oradba_linux_at_attbi.com>
Date: Wed, 26 Feb 2003 02:38:17 GMT
Message-ID: <pan.2003.02.26.02.42.17.123873_at_attbi.com>
Date: Wed, 26 Feb 2003 02:38:17 GMT
Message-ID: <pan.2003.02.26.02.42.17.123873_at_attbi.com>
On Wed, 26 Feb 2003 11:44:46 +1100, abc wrote:
> Hi,
>
> I have a simple SQL
>
> SELECT DECODE(a.date, NULL, 'Date Not Exists', a.date) as Date
> FROM CALENDAR WHERE date = '01-JAN-2003'
>
> '01-JAN-2003' is not in CALENDAR Table then I must expect a
> Default return as 'Date Not Exists'. But that doesn't work.
>
> Anyone knows how to get this Default Return if No rows return.
>
> Thanks
try with trunc(date)
Received on Wed Feb 26 2003 - 03:38:17 CET
