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: SQL Help

Re: SQL Help

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: 2000/06/22
Message-ID: <39520E32.6CD48329@edcmail.cr.usgs.gov>#1/1

>
> ACCESSLEVEL(ACCESSID) ON DELETE CASCADE)
>
> *
> ERROR at line 5:
> ORA-02270: no matching unique or primary key for this column-list
> /**********************************************************************/
>
> I am able to create accesslevel, which has a composite key comprising
> accessid and transcationid, but i do not know why labuser is not able to
> have relation with accessid.

The reason that you are having a problem is due to the fact that there is no unique or primary key for just the ACCESSID column. Your primary key is a composite key. If you want to use the primary key in a FK relationship, you need to use the entire primary key, not just one part of it. Try creating a unique key on ACCESSID in the ACCESSLEVEL table and the FK should work just fine.

HTH,
Brian

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Thu Jun 22 2000 - 00:00:00 CDT

Original text of this message

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