I want to write a Procedure to insert the data (huge).
Suppose I have insert statement foloowed by a select statement.
But at time i do not want to select whole data.I want to select particular period data,for period i have one column in the table.So i want to pass every time period value to where clause.

What is the best way ?

My Code like :
Procedure name xyz
declaring a cursor to store all periodic dates.
Loop
fetching periodic values
insert statement
select statement where valueseriodic
end loop

Every time i need to pass periodic value into where clause.
PLease post your ideas