RE: DECODE statenment

RE: DECODE statenment

 

  

Hi,

Try this query.

select decode(greatest(column,0),0,'True','False') from dual;

If the column value is less than 0 greatest will return 0 and the decode will print as True.

Regards,
Nandhakumar.


-----Original Message-----
From: Shadab Mehboob
[mailto:oracledba-ezmlmshield-x62011161.[Email address protected]
Sent: Thursday, June 28, 2007 11:32 AM
To: LazyDBA Discussion
Subject: DECODE statenment


Dear Friends
How do i check in a sql decode statement whether a column value is less than zero.


Regards
Shadab


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


-----------------------------------DISCLAIMER----------------------------------------------------------------
This email is confidential. If you are not the addressee tell the
sender immediately and destroy this email without using, sending or storing
it. Emails are not secure and may suffer errors, viruses, delay,
interception and amendment. ING Vysya Bank Ltd and subsidiaries do not accept
liability for damage caused by this email and may monitor email
traffic.

--------------------------------------------------------------------------------------------------------------------------

Oracle LazyDBA home page