Hi Friends,
In my sql script i am running the following query and
if the condition matches i want to run the query inside decode.How its is possible??
select decode(1,1,'select version_no from sit_version;', null) query_result from dual;
Your query means, "If 1 = 1, then select version_no from sit_version;". Since 1 = 1 as long as I've been alive, why not just say, 'select version_no from sit_version;'?
Mufasa
(aka Dave of Sandy, Utah, USA @ 06:46 (02Jul04) UTC (aka "GMT" and "Zulu"), 23:46 (01Jul04) Mountain Time)
actually it will be a variable instead of 1.I had just given so that easy to understand..it will be like this
select decode(&nu,1,'select * from sit_version;',null) from dual;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.