I face problems to extract data from one table and insert it in another one


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

For modifications, I have to extract data from one table and insert it in another one, after this I have to get the new id from the second table and place it in the first table.

Did you know?Explore Trending and Topic pages for more stories like this.
More or less, it should be so:

For every record loop
select law_item from table_one;
insert law_item into table_two;
insert into table one(law_id) values(table_two_sequence.currval);
End loop;

I saw (and I tried) many thing on Internet... (as type, bulk collect...) but did not succeeded in it.
Does anybody have a solution ?

Thank you in advance
No comments posted yet

Your Answer:

Login to answer
115 Like 49 Dislike
Previous forums Next forums
Other forums

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

Results from Db outputted twice
Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out

Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?

Code: &a

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash