Hi jmodic,

There are some tables say

table1 -- column11,column12

table2 -- column21,column22

table3 -- column31,column32

table4 -- column41,column42,


what i require is

select column11 from table1 where column12 =
decode(column21,'M',(select column31 from table3 where column32=column22),
(select column41 FROM column4 WHERE column21 = column42))

how can i write the above query more efficiently..
i am planning to use the function in the else part...
any advantages of using function...thanks

pras