Hi All,
Because of project limitations, I cant write PLSQL and hence need to write login in SQL only. I would like to know how can we do looping and if else in SQL statement. I cam across
looping from blog How to do a loop in Oracle SQL ,
with t as
(
select date '2008-06-01' d1, date '2008-06-10' d2 from dual
)
select d1 + i days
from t, xmltable('for $i in 0 to xs:int(D) return $i' passing xmlelement(d, d2-d1)
columns i integer path '.')
So, whi
but would like to know how to do if else and exit from loop. If i am able to understand the above, then may be i can try to write my logic. Could anyone please advise with some explanation about the above SQL