Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Deferrable constraints in O7
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...Received on Tue Jul 03 2001 - 10:13:31 CDT
> 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"
>
![]() |
![]() |