wood burning stoves 2.0*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
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: 42

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: 11314
    
  16

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.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1716
    
  14

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!]


No more Blub for me, thank you, Vicar.
 
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