MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » June 2008

SQL: How to delete records based on another file



fixed

Hi folks,

I have a file with some extra records I would like to delete and I am hoping someone can help me. Here is the scenario:

Let's say I have a file called GoodFile, and it has data like so:
company, debtor, cc, yy, mm, slsman, plus other fields
61,1234567, 20, 08, 01, 1234
61,1234567, 20, 08, 02, 5678
61,1234567, 20, 08, 03, 6789

Let's say I have another file called BadFile, and it has data like so:
company, debtor, cc, yy, mm, slsman, plus other fields
61,1234567, 20, 08, 01, 1234
61,1234567, 20, 08, 01, 4321
61,1234567, 20, 08, 01, 1111
61,1234567, 20, 08, 02, 5678
61,1234567, 20, 08, 02, 8765
61,1234567, 20, 08, 02, 2222
61,1234567, 20, 08, 03, 6789

I would like to remove the records from BadFile that don't have a match (based on 6 fields shown) in GoodFile.

Thanks.

Glenn Gundermann
ggundermann@xxxxxx
New Cell #: 416-317-3144





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact