Home » SQL & PL/SQL » SQL & PL/SQL » Foreign Key Constraint
Foreign Key Constraint [message #197554] Wed, 11 October 2006 14:28 Go to next message
nabeel.rashid
Messages: 2
Registered: September 2006
Location: Jeddah
Junior Member
Hi guys
i have problem that from a text file i have to insert records in a table,there is a foreign key constraint enabled on that table.how can i insert qualified rows in the table at the same time i want
non qualified rows to be written to any other place .is it possible.
Regards
Re: Foreign Key Constraint [message #197555 is a reply to message #197554] Wed, 11 October 2006 14:55 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One way could be this: create an external table whose source will be text file you are talking about. Write a PL/SQL procedure which will, through a loop, insert valid records into one table, while - in an exception handler - invalid records will be written into another one.
Previous Topic: triggers
Next Topic: Column Description in Sybase (merged cross-posts)
Goto Forum:
  


Current Time: Sat Dec 10 04:44:00 CST 2016

Total time taken to generate the page: 0.29917 seconds