Steve, try this: sel vendorn from master where vendorn not in (sel vendorn from vendor) sel vendor2 from master where vendor2 not in (sel vendorn from vendor) also sel count(*) from master where vendorn not in (sel vendorn from vendor) and same for vendor2
Bernie Lis
----- Original Message ----- From: "Steve Breen" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Wednesday, May 04, 2005 2:18 PM
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
