Re: Help with Oracle constrant on two tables problem

From: <fitzjarrell_at_cox.net>
Date: Mon, 18 Feb 2008 11:43:42 -0800 (PST)
Message-ID: <5564a24b-d2a1-47aa-b40c-6cd608a0be30@h11g2000prf.googlegroups.com>


On Feb 18, 1:25 pm, jharbo..._at_googlemail.com wrote:
> Hello Robert and Michaeland thank you for your SQL.
>
> I think your SQL is to complicated and, taking your SQL and changing
> it this is what I need
>
> ALTER TABLE tblT2
>  ADD CONSTRAINT DI_CorrectMethodSetCount
>   CHECK exists (SELECT tblt2.id,tblt1.id1
>       FROM tblT1, tblT2
>        WHERE tblT1.id1 = tblT2.id1
>         AND tblT1.id1 = tblt2.id1
>         GROUP BY tblT1.checkCount, tblt1.id1, tblt2.id
>          HAVING COUNT(*) = tblT1.checkCount-1);
>
> My Oracle SQL isn't right and when I type this in I get an error.
>
> Could you correct it please
>
> Thank you
>
> Jon

You could post the SQL but not the error it generates?

David Fitzjarrell Received on Mon Feb 18 2008 - 13:43:42 CST

Original text of this message