Re: Creating assertions on oracle 10g

From: Pedda <hemanth.6996_at_gmail.com>
Date: Mon, 16 Nov 2009 06:13:32 -0800 (PST)
Message-ID: <1f169f05-fedd-4eb2-8391-5beb79ab46cf_at_y28g2000prd.googlegroups.com>



On Nov 9, 1:14 am, ErikYkema <erik.yk..._at_gmail.com> wrote:
> On 31 okt, 11:50, Pedda <hemanth.6..._at_gmail.com> wrote:
>
> > Hi,
> > I am working on Oracle 10g Database.
> > I am trying to create an assertion in Oracle 10g but it is displaying
> > an error  message
> > I use the following command to create an assertion in 10g but it is
> > not working.
>
> > CREATE ASSERTION AST1(SELECT COUNT(*) FROM EMP + SELECT COUNT(*) FROM
> > DEPT>SELECT COUNT(*) FROM EMP_DEPT);
>
> > Please let me know any changes to the above command so that the above
> > assertion works in Oracle10g
>
> > Thanks,
> > Hemanth
>
> You might want to look for Toon Koppelaar's book 'Applied Mathematics
> for Database Professionals' (APress) and his framework/websitehttp://www.rulegen.com. Here he proposes/offers a framework for the
> Oracle database that comes somewhat closer toassertions.
> Erik

Thanks Erik
Sure here is the change
CREATE ASSERTION ASS_NAME CHECK
((SELECT COUNT(S.SID) FROM STUDENTS S) +  (SELECT COUNT(F.FID)FROM FACULTY F)<100); Received on Mon Nov 16 2009 - 08:13:32 CST

Original text of this message