Home » SQL & PL/SQL » SQL & PL/SQL » Decode statement (oracle 9i win xp)
Decode statement [message #319152] Fri, 09 May 2008 03:29 Go to next message
shanthakumar.utt
Messages: 15
Registered: May 2008
Location: bangalore
Junior Member
Hi all,

I got an doubt with decode statement. how can i implement this condition using decode ,

if salary > 4000.?

decode(salary,...);
wat should be the next step can v implement tat usin decode?

thanks in advance.
Re: Decode statement [message #319153 is a reply to message #319152] Fri, 09 May 2008 03:32 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You would need to look at the Sign of (salary-4000) in your decode.

Personally, I'd use CASE
Re: Decode statement [message #319155 is a reply to message #319152] Fri, 09 May 2008 03:33 Go to previous message
kecd_deepak
Messages: 52
Registered: December 2007
Member
Hi,
You can use SIGN function for this.

regards
Deepak
Previous Topic: retrieve single record row
Next Topic: implicit cursor
Goto Forum:
  


Current Time: Wed Dec 07 22:28:57 CST 2016

Total time taken to generate the page: 0.05462 seconds