Buddy, Yes, That's what I was looking for. I was concerned that I was off the beaten track and I was.
Steve -----Original Message----- From: Walker, Buddy [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 2:16 PM To: [email protected] Subject: [RBG7-L] - Re: Verification of Command results possibilities Steve If you want the count from the vendor weather or not the vendorn or vendorn2 is not in the master. Sel count(*) from vendor whe vendorn not in (sel vendorn from master) or vendor not in (sel vendorn2 from master whe vendor2 is not null) If you use and then even if one does not match it will not be counted. Hope I'm understanding you right. Buddy -------------------------- Sent from my BlackBerry Wireless Handheld -----Original Message----- From: [email protected] <[email protected]> To: RBG7-L Mailing List <[email protected]> Sent: Wed May 04 14:18:13 2005 Subject: [RBG7-L] - Re: Verification of Command results possibilities Buddy, This only checks one column against the master table. I need to verify both columns from master (vendorn or vendor2) are not related to the vendor table. Basically trying to determine if we have ever used the vendor at all. Vendorn is a primary vendor assigned to the master table and vendor2 is a secondary vendor assigned to the master table. we are trying to determine how may junk records or vendors are in the vendor database that have never been used. The records are over 15 years old and there are a lot of vendors that were put in and never used. Steve -----Original Message----- From: Walker, Buddy [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 1:09 PM To: [email protected] Subject: [RBG7-L] - Re: Verification of Command results possibilities Steve Sel count(*) from vendor whe vendorn not in (sel vendorn from master) Buddy -------------------------- Sent from my BlackBerry Wireless Handheld -----Original Message----- From: [email protected] <[email protected]> To: RBG7-L Mailing List <[email protected]> Sent: Wed May 04 14:00:54 2005 Subject: [RBG7-L] - Verification of Command results possibilities Here is the question. I have two tables. 1. Vendor 2. Master In the table vendor there is a column named: Vendorn In the Table Master there are columns named: Vendorn and Vendor2 Here is the issue: I am trying to determine how many vendor records are in the vendor table that do not relate to the master table. I think my method is correct, but I want a second opinion. Now finally the question. Will the command below give me the actual number of records that have no relation to the master table. I know this is simple stuff, stuff but this is a critical issue and I want to double check myself. I have to get accurate results. R>compute count vendorn from vendor where vendorn not in (sel vendorn from master) and vendorn not in (sel vendor2 from master) Your help is appreciated Steve Breen
