Monday, 9 September 2013

Looping in PL SQL

Looping in PL SQL

Oracle PS SQL nested loop:
Table 1
key_col start_year End_year
1000 2008 2010
1002 2009 2012
For each key_col value I want to insert rows by looping through the
start_year and end_year for that key_col. For example for key_col = 1000,
I'd like to insert the following to my target table
key_col year
1000 2008
1000 2009
1000 2010
How can I do this in PL SQL?

No comments:

Post a Comment