Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Table Question

Re: Table Question

From: Jerry Gitomer <jgitomer_at_hbsrx.com>
Date: Thu, 6 May 1999 09:17:45 -0400
Message-ID: <7gs4kg$9cm$1@autumn.news.rcn.net>


You have a design problem that you have to resolve first.

    You are trying to insert records into a table that have the same values for sequence as records already in the table. You may be able to use one of the following three solutions to solve your problem.

    If you are using Oracle sequence generation to create the sequences one possible solution is to use the same sequence for both tables. This would allow you to insert the transactions into the production table without conflicts.

    A second solution which is only viable if the transaction information is to replace the production information where the sequence numbers are the same is to use an update rather than an insert.

    A third solution is to change the sequence at the time the row is inserted into the production table and just use the next available sequence number.

regards

Jerry Gitomer


Arthur Merar wrote in message <373200b6.177399935_at_news.chaven.com>...
>
>
>Hello,
>
>I have a question about inserting data into tables. We have two
>tables.....one is production, and the other are transactions that need
>to be inserted into production.
>
>However, the production table has many constraints on it. And, it has
>a sequence on it.
>
>So, my question is: When I insert the records, I get a unique
>constraint error on the sequence number. How can I insert these
>records and have the sequence work correctly? This transaction table
>has sequence numbers that must conflict with the production table.
>
>Also, when I export a table, have can I not export the constraints so
>when I import it I do not get all the errors if the object exists?
>
>Any help would be appreciated.
>
>Please e-mail a copy of your response.
>
>Thanks,
>
>Arthur
>amerar_at_unsu.com
>amerar_at_ci.chi.il.us
>
Received on Thu May 06 1999 - 08:17:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US