using LEVEL keyword
Hi,
I have a table like below..
CAL eff_date
A 1/1/2012
A 1/2/2012
A 1/3/2012
A 1/4/2012
A 1/5/2012
A 1/6/2012
A 1/7/2012
And now I need to somehow generate this weekly caledar for 1 year.(using sql) I tried using level.
with t as
(select level l from dual connect by level <=52),
t1 as
(SELECT c.cal,eff+l eff,perwgt,repeat,opt
FROM cal c,t
)
select * from t1 order by eff
Can anyone help me out how to add a seq no for each date. meaning all records should be added with 1 and then 2 and the 3... upto 52
Thanks..