This is better:

RULES 'USA or Canada - Post code not in Table1' +
FOR `Table2` FAILS +
WHERE Country IS NOT NULL AND Country IN ('USA','CANADA') AND +
 FAILS (SELECT ZipCode FROM Table1 WHERE Table1.ZipCode = Table2.ZipCode )

Dennis

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath
Sent: Thursday, May 14, 2009 3:54 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: rules problem

RULES 'USA or Canada - Post code not in Table1' +
FOR `Table2` SUCCEEDS +
WHERE EXISTS (SELECT ZipCode FROM Table1 +
WHERE Table1.ZipCode = Table2.ZipCode ) +
OR (Country NOT IN ('USA','Canada'))

Dennis

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dan Goldberg
Sent: Thursday, May 14, 2009 3:35 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - rules problem

 
I am trying to create a rule and cannot figure out how to make it work.

I want to verify that a zipcode exists in another table only if the country
column is "usa" or "canada".

I can do the verify using the rule wizard but cannot figure out how to do
the country.

Any help is appreciated.


Dan Goldberg


Reply via email to