Scott
 
If the columns are integers, that's what it's doing: adding them.
 
This will also be slow.  Perhaps try this:
 
edit all from salestrans t1 where t1.plantno not in (select t2.plantno from job t2 where t2.custno = t1.custno and t2.jobno = t2.jobno)
 
David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261
----- Original Message -----
Sent: Wednesday, March 02, 2005 3:45 PM
Subject: [RBASE-L] - Finding Records in a table that violate the one-to-many relationship

Maybe someone can help me with this situation.  I issued the following command:
 
R>edit all from salestrans where plantno+custid+jobno not in (select plantno+custid+jobno from job)
 
The key to the table job is the plant number, customer number, and the job number which make it unique.
 
Any records in the salestrans must have a corresponding match in the job table (many-to-one relationship).
 
What I wanted to do is check the salestrans to make sure a record in the job table had not been deleted, leaving an unmatched record(s) in the salestrans table.  This command has been sucessful in finding such strays, but it failed to find a problem this time. 
 
I thought by saying plantno+custid+jobno was a way to use a multi-column key in a command.  Maybe it is literally adding the values?
 

Reply via email to