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
It did not work. I am using Postgresql-7.0.2. Can someone point out my
Thanks in advance.
pgsql-novice by date
|Next:||From: Fernando M. Maresca||Date: 2000-10-11 21:53:37|
|Subject: Web pages tables over intranet|
|Previous:||From: Tom Lane||Date: 2000-10-11 14:38:10|
|Subject: Re: About index ... |