Help with decode statement..
Hi everyone,
I am trying to write a decode statement which has SELECT stament in it.
Is it possible to write a decode which has select statement in it.
EX
select Decode (some_id, select count(*) from table where condition,result,default_value)
what i am trying to do is ...if
select count(*) from table where condition returns 0 then i need 1 result and if it returns greater than 0 i need other result.
could some one give me an example to do that.
Thanks
phani