Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need to insert selected records from PROD into TEST

userLynxJun 3 2009 — edited Jun 3 2009
I am trying to insert all records (for a specific region only) from production to test.

I'm a little confused about how the pl/sql would look for this.

Note that as I insert into the table in test, I also have a key field that is auto incremented by 1 each time.

The problem that I am having is I need to link two tables in PROD together to determine the region:

So in test, I want to do something like:

INSERT INTO ACCOUNT_PRICE
(select * from ACCOUNT_PRICE@PROD, MARKETER_ACCOUNT@PROD
where substr(MARKETER_ACCT_NO,1,1) = '3'
and MARKETER_ACCOUNT_NO = PRICE_ACCOUNT_NO);

However, i'm not sure if this is correct or if I should be using a BULK insert.

Note that I cannot just load the whole table as I need to restrict it to only one region of data.

Any help would be appreciated.

Sean
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2009
Added on Jun 3 2009
4 comments
865 views