From: ytroadec@spir.fr
Newsgroups: comp.databases.oracle.misc
References: <3b6fe5dd.0@morille> <997209715.18381.0.pluto.d4ee154e@news.demon.nl>
Subject: Re: How do a constraint referencing a snapshot field ?
Date: Wed, 8 Aug 2001 09:31:35 +0100
Lines: 46
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <3b70e07f.0@morille>
NNTP-Posting-Host: 194.183.192.43
X-Trace: 8 Aug 2001 09:34:04 +0100, 194.183.192.43



Sybrand Bakker <postbus@sybrandb.demon.nl> a écrit dans le message :
997209715.18381.0.pluto.d4ee154e@news.demon.nl...
>
> <ytroadec@spir.fr> wrote in message news:3b6fe5dd.0@morille...
> > Hi,
> > How do a constraint referencing a snapshot field ?
> >
> > The following script doesn't work (returns error message 'ORA-02444:
 cannot
> > resolve referenced object in referential constraints ') :
> >
> > >alter table TABLE1
> > >add constraint FK_TABLE1_SNAPSHOT1 foreign key  (FIELD1)
> > >references SNAPSHOT1 (FIELD1)
> >
> > (SNAPSHOT1 is a snapshot and TABLE1 is a table).
> >
> > Thanx
> >
> >
>
> This is not possible.
>
> Sorry
>
> Regards,
>
> Sybrand Bakker, Senior Oracle DBA
>
>
Hi,

For your information, after some tries, i could do it by referencing the
physical snapshot table with the script :

alter table TABLE1
add constraint FK_TABLE1_SNAPSHOT1 foreign key  (FIELD1)
references SNAP$_SNAPSHOT1 (FIELD1)

Is it the only solution ?

Thanx.




