Home » SQL & PL/SQL » SQL & PL/SQL » sql help for(3 condition st)
sql help for(3 condition st) [message #19732] Fri, 05 April 2002 01:35 Go to next message
sonali vernekar
Messages: 8
Registered: March 2002
Junior Member
i want to write a single sql st & display hi,ok,low
fro sal column where sal>10000-- hi sal
sal>5000 ---ok sal<5000 low sal.
i havegot 3 condn to be implemented in a single sql query.
how will i do it?

thanks in advance
Re: sql help for(3 condition st) [message #19775 is a reply to message #19732] Tue, 09 April 2002 05:31 Go to previous message
aVictora
Messages: 1
Registered: April 2002
Junior Member
Run the following query with the salary as input everytime and you will get the required result

select decode(trunc(&1/5000), 0, 'Low', 1, 'OK', 'High')
from dual
/
Previous Topic: dbms - packages
Next Topic: %rowtype in a cursor
Goto Forum:
  


Current Time: Sun May 05 00:01:23 CDT 2024