MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » November 2012

Validating data with SQL



fixed

I have 2 files. A detail file and a summary file. There is a field in both files called Compensation type. The summary file is based on rolling up the data from the detail file based on 15 key fields. All of which are attributes in the detail file. I am trying to verify that all of the detail records for a given set of keys have the same Compensation type. If they don't, having the Compensation type at the summary file level doesn't make sense.

Here is some sample data: (I shortened the # of key fields to make it easier to understand)
Key1 Key2 Key3 .... Cmpsn Type
1 2 3 Gold
1 2 3 Gold
1 2 3 Gold
1 2 3 Gold
1 3 5 Silver
1 3 5 Silver
1 3 5 Bronze
2 1 1 Bronze
2 1 1 Bronze
2 1 1 Bronze
2 1 1 Bronze
2 1 1 Bronze
3 2 1 Gold

In this set of records, I'm trying to identify the situation for the second set of keys (1,3,5) where the Compensation type is Silver on 2 records and Bronze on the third.

Dean Eshleman
Software Development Architect

Everence Financial
1110 North Main Street
PO Box 483
Goshen, IN 46527
Phone: (574) 533-9515 x3528
www.everence.com<http://www.everence.com>






________________________________________
Confidentiality Notice: This information is intended only for the individual or entity named. If you are not the intended recipient, do not use or disclose this information. If you received this e-mail in error, please delete or otherwise destroy it and contact us at (800) 348-7468 so we can take steps to avoid such transmission errors in the future. Thank you.
_______________






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