Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swapping Foreign Keys

Status
Not open for further replies.

RJSHA1

Programmer
Apr 12, 2001
66
GB
hello,
I have a problem and am wondering if anyone has got any ideas about how I should tackle it.
I have two tables : INSTRUMENT and CROSS_REFERENCE, the primary key in the INSTRUMENT table, it has 3 columns in it, is also an foreign key in the CROSS_REFERENCE table. I need to write a job that swaps the primary key of one instrument witht he primary key of another.

Currently I do it manually, and I am not allowed to turn off the constraints, or have a temporary table to load the data into. I had thought of using PL/SQL tables to sore the rows and manipulate them in there . Im using 7.3.4

Does anyone have any ideas


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top