aspose file tools
The moose likes JDBC and the fly likes Using a Cursor to Retrieve Data From One Table and Insert Into Another table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Using a Cursor to Retrieve Data From One Table and Insert Into Another table" Watch "Using a Cursor to Retrieve Data From One Table and Insert Into Another table" New topic
Author

Using a Cursor to Retrieve Data From One Table and Insert Into Another table

seema chhetri
Ranch Hand

Joined: Feb 17, 2009
Posts: 41

Using a Cursor to Retrieve Data From One Table and Insert Into Another

i tried the below code but it couldnt helped...





thanks
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 9940
    
    6

Nope. We don't hand out answers here. Folk will help YOU write it, but you need to Show Some Effort yourself.

Or, you can always make a post in "Jobs offered" and see if anyone will code it for a fee.


Never ascribe to malice that which can be adequately explained by stupidity.
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1103
    
    7

As Fred says, you should ShowSomeEffort.

However, here is a tip: Use "INSERT...SELECT" to perform the SELECT and the INSERT in a single statement e.g.
You should be able to figure it out from here.

[Edited my reply after I spotted the fairly obvious fact that you are using Oracle PL/SQL - doh!]


ex-Oracle bloke
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using a Cursor to Retrieve Data From One Table and Insert Into Another table
 
Similar Threads
Closing cursor in a stored procedure when invoked from a callable statement
how to update multiple table in frame
Doubt on cursor position of resultset?
Looking for a good design for performance
multiple inserts with multiple connections into same db table.