Dawn I think you could even do this with a view and a RULE. Create a view (call in FullFormula) joining the two tables I know R:Base will accept this command, but I have tested how it would actually work when the rule was violated. Try it!
RULES 'This formula already exists!' for FullFormulas SUCCEEDS WHERE ColorNum NOT IN (SELECT ColorNum FROM FullFormula T2 WHERE T2.ColorNum = FullFormulas.ColorNum AND T2. Inkloading = FullFormulas.Inkloading and T2.PartNum = FullFormulas.PartNum AND T2.PartRatio = FullFormulas.PartRation and T2.Oilratio = FullFormulas.OilRatio) If the rule doesn't work, an EEP running in either table could look up linking values in the other table and make sure the new combo wasn't a duplicate David Blocker [EMAIL PROTECTED] 781-784-1919 Fax: 781-784-1860 Cell: 339-206-0261 ----- Original Message ----- From: "Dawn Oakes" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, August 10, 2004 3:39 PM Subject: [RBG7-L] - Checking for duplicate - multiple rows I have two tables which together, comprise formulas for making ink. I would like to set up an eep to run when a new color gets assigned to be sure the formula isn't already assigned another number. Here's an example of the data. Table: ColorNumbers ColorNum Inkloading CY001CL 1.5 Table: ColorFormulas ColorNum Partnum Partratio Oilratio CY001CL 1212XY 10.5 NULL CY001CL 775258 2.5 NULL CY001CL 80888 NULL 80.00 CY001CL 80253 NULL 20.00 The combination of all the rows in ColorFormulas along with the InkLoading in ColorNumbers makes the formula unique. I can declare a cursor, convert the numbers to text and do a concatenation to get a text value representing the entire formula, but was wondering if there was an easier way. Thanks Dawn
