Connecting Tech Pros Worldwide Forums | Help | Site Map

plz suggest reg. cursors

Newbie
 
Join Date: Sep 2008
Posts: 3
#1: Nov 24 '08
Hi,



I have my requirement as below.



I have 10000 records coming from my select query.





How do I insert these rows into another table in db2 stored procedure using cursors (fetch multi rows into <table name> some thing like this), I should not iterate through the cursor record by record, as it hits my performance.



Also I can’t use direct query:



insert into <table1> select name, no from <table2> order by name.

Because it’s not allowing to having order by in sub queries.



I am working on DB2 UDB V8





Kindly suggest me regarding this.





Thanks,

Shiva.

Reply