I remember finding what amounts to the same problem when I wanted 
to ensure that there would always be exactly one row in the DUMMY 
table. I tried a rule with the expression SUCCEEDS WHERE 1 = 
(SELECT COUNT FROM Dummy), but it always allowed adding a 
second row, and didn't prevent deleting the one row already there. I 
found a work-around for that through a combination of rules and 
constraints. 

I can imagine it would be tricky to program R:Base to evaluate rules 
with aggregate expressions meant to include (or exclude, on delete) 
the current candidate row. Even trickier to come up with a 
comprehensive test suite.

Bill

On Mon, 25 Feb 2002 03:34:13 -0500, J.M. GRATIAS wrote:

>Reason is that a view or a SELECT SUM(Weight_percentage) INTO 
... apply
>only to existing rows BEFORE the curent row is being updated : it 
don't
>take into account the new being created/updated.




================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to