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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Deferrable constraints in O7

Re: Deferrable constraints in O7

From: Benetnasch <benetnasch.spam.begone_at_blimey.co.uk>
Date: Tue, 3 Jul 2001 16:13:31 +0100
Message-ID: <xil07.4422$A51.1022121@monolith.news.easynet.net>

Bother.

Thanks for the info anyway!

Hmmm... in that case, is there any other way around my predicament, which is thus:

I have 2 tables, a header table (one) & a details one (to many). The header id is a foreign key
in the details table.

In the header record is a count & total of a number of transactions.

At the moment, to insert both header & detail records, I have to execute 2 cursors:

This is daft because I'm selecting twice from the same rows. I thought about merging the
2 together, and calculate the count & totals as I loop through. However, I can't insert
rows into the detail table BEFORE the header record because of the constraint, but I
need to because I won't know the totals until the last detail record has been processed.

Thanks!

--
Benetnasch
Remove ".spam.begone"

Stephen Bell <stephen.bell_at_cgi.ca> wrote in message
news:3B41DD47.23236625_at_cgi.ca...

> Hi,
>
> Unfortunately you can't in 7...
> It was available only in 8, perhaps even 8i
>
> Steve
>
> Benetnasch wrote:
>
> > Can I defer a table constraint in Oracle 7? I've tried:
> >
> > ALTER SESSION SET CONSTRAINT <constraint name> DEFERRED
> >
> > ... but it doesn't like that...
> >
> > Any help'd be appreciated.
> > --
> > Benetnasch
> > Remove ".spam.begone"
>
Received on Tue Jul 03 2001 - 10:13:31 CDT

Original text of this message

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