Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Insert PK to another database
What you have Mr. David, is autonumbering implemented via a trigger:
To do what you want to do, you need to either:
and then code your trigger logic in target schema .. like this:
begin if (trigger_disable.gv_disable_mytrigger) then return; end if; .... rest of logic and then disable the trigger in your session by issuing this before the insert: begin trigger_disable.gv_disable_trigger_at_link_name := true; end; /
Anurag
"David Nguyen" <nguyend4_at_hotmail.com> wrote in message news:9a0092d.0302251917.d74ea07_at_posting.google.com...
> Hi all,
>
> I have another challenge. I insert a certain rows from one database
> to another by using insert SQL
>
> SQL>insert into target_table select * from source_table_at_link_name
> where PK = '15';
>
> 1 rows inserted
>
> However, it insert into the target_table of my new database with new
> PK number and I have to go inside and manually edit the PK. Is there
> a way that I can keep the same PK number by using insert without going
> inside the table update manually?
>
> Thanks
>
> David
Received on Tue Feb 25 2003 - 21:45:54 CST