well, pardon me if im wrong because i havent worked much with views and never worked with rules, but it looks to me that the rule is whats letting > 10 through.
the rule basicly says in english: let in records where InstCount <= 10 OR let in records that are not part of the view it seems to me the rule should be: let in records where IsntCount<=10 OR (let in records that are not part of the view and these records have InstCount<=10) so i think that would look something like this: (Top10_Performances.Inst_Type IN ( SELECT InstType FROM Top10_Rule_View WHERE InstCount <= 10 ) OR (NOT Top10_Performances.Inst_Type IN ( SELECT InstType FROM Top10_Rule_View ) AND Top10_Performances.InstCount<=10)) ----- Original Message ----- From: "Alastair Burr" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 4:19 AM Subject: [RBASE-L] - Re: Rule problem > I think I've found out what's wrong while playing with the view as Sami > suggested: > > While a value exists in the view then it works. > When a value doesn't exist then it also works - but not as I want - or > expected. > > Obviously, once the penny/cent drops, any new value will not be in the > view so the rule prevents the addition of the row. > > So I changed the view to: > > create view Top10_Rule_View (InstType, InstCount) as SELECT > Inst_Type, COUNT(Inst_Type) FROM Top10_Performances > GROUP BY Inst_Type > > and the rule to: > > (Top10_Performances.Inst_Type IN ( SELECT InstType FROM > Top10_Rule_View WHERE InstCount <= 10 ) OR NOT > Top10_Performances.Inst_Type IN ( SELECT InstType FROM > Top10_Rule_View )) > > I had hoped that this would prevent entries where the count was more > than 10 and let in any new Inst_Type(s). > It lets in new ones but also more than 10 the same. > > Anybody got any ideas why? > > Regards, > Alastair. > > > ----- Original Message ----- > From: "Alastair Burr" <[EMAIL PROTECTED]> > To: "RBASE-L Mailing List" <[EMAIL PROTECTED]> > Sent: Sunday, January 26, 2003 5:48 PM > Subject: [RBASE-L] - Re: Rule problem > > > > Thanks, Sami, > > > > I was trying to avoid a view because _as far as I can tell_ the select > works > > at the R:>. > > > > I'll give it a while and see if anybody else has any comments then try a > > view. > > > > Regards, > > Alastair. > > > > > > ----- Original Message ----- > > From: "Sami Aaron" <[EMAIL PROTECTED]> > > To: "RBASE-L Mailing List" <[EMAIL PROTECTED]> > > Sent: Sunday, January 26, 2003 4:41 PM > > Subject: [RBASE-L] - Re: Rule problem > > > > > > > Alastair - > > > > > > It seems like this should work but ...Have you tried creating the GROUP > BY > > > portion as a view and referencing the view in your rule? > > > > > > Sami > > > > > > ----------------------------------------------------------- > > > Sami Aaron > > > Software Management Specialists > > > 19312 W 63rd Terr > > > Shawnee KS 66218 > > > 913-915-1971 > > > [EMAIL PROTECTED] > > > http://www.softwaremgmt.com > > > > > > ----- Original Message ----- > > > From: "Alastair Burr" <[EMAIL PROTECTED]> > > > To: "RBASE-L Mailing List" <[EMAIL PROTECTED]> > > > Sent: Sunday, January 26, 2003 6:14 AM > > > Subject: [RBASE-L] - Rule problem > > > > > > > > > > Hi all, > > > > > > > > Can anybody tell me why this rule doesn't work? > > > > > > > > MESSAGE : Limit of [ 10 ] entries reached! > > > > TABLE : Top10_Performances Row is added or changed if condition > > > SUCCEEDS > > > > WHERE : Top10_Performances.Inst_Type IN ( SELECT Inst_Type FROM > > > > Top10_Performances GROUP BY Inst_Type HAVING COUNT(Inst_Type) <= 10 ) > > > > > > > > I'm trying to limit the number of rows for any individual value in > > > Inst_Type > > > > to a maximum of 10 (10 guitars, 10 drums, etc.). At the moment > whichever > > I > > > > way I try this (succeeds or fails) I cannot change anything even > though > > > > there are only 5 rows in the table. > > > > > > > > Thanks in advance, > > > > Regards, > > > > Alastair. > > > > > > > > ---------------------------------- > > > > A D B Burr, > > > > St. Albans, UK. > > > > ---------------------------------- > > > > [EMAIL PROTECTED] > > > > ---------------------------------- > > > > > > > > > > > > > > > > > > > > > >

