From: | deval <deval(at)giaspn01(dot)vsnl(dot)net(dot)in> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | assertion |
Date: | 2000-10-11 15:31:12 |
Message-ID: | 39E487C0.62181127@giaspn01.vsnl.net.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi
I have two tables, INMAT to track incoming material, which I process and
return, and OUTMAT to track outgoing material. each entry in INMAT is a
serial, INKY. Incoming Quantity is under field INQTY. Outgoing quantity
in OUTMAT is under field OQTY. To check that outgoing material does not
exceed material that came in I copied the following construction from
"Database Systems" by Elmasri and Navathe.
CREATE ASSERTION OQTY_CONSTRAINT
CHECK ( OUTMAT.OQTY<=INMAT.INQTY FROM OUTMAT,INMAT
WHERE OUTMAT.INKY=INMAT.INKY);
It did not work. I am using Postgresql-7.0.2. Can someone point out my
mistake?
Thanks in advance.
Vijay
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando M. Maresca | 2000-10-11 21:53:37 | Web pages tables over intranet |
Previous Message | Tom Lane | 2000-10-11 14:38:10 | Re: About index ... |