Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
I have a file with 6 fields say F1 thru F6.
I want to find all the records in the file where field F1 and F2 is
same.
I also want another report which has all the records where Field F1
is same but F2 is different.
I know that I have stated the requirements badly, so let me
illustrate with an example.
If my file has following records denoted by F1,F2,F3,F4,F5,F6
(the combination of F3,F4,F5,F6 is different in all the records):
<<SNIP sample data; F3-F6 not pertinent; replaced by DDL+DML:>>
My first report will have records:
DDD,YYY,*,*,*,*
DDD,YYY,*,*,*,*
FFF,XXX,*,*,*,*
FFF,XXX,*,*,*,*
FFF,XXX,*,*,*,*
My second report will have records:
AAA,XXX,*,*,*,*
AAA,YYY,*,*,*,*
EEE,XXX,*,*,*,*
EEE,ZZZ,*,*,*,*
FFF,XXX,*,*,*,*
FFF,XXX,*,*,*,*
FFF,XXX,*,*,*,*
FFF,ZZZ,*,*,*,*
To further clarify, F1 is something called PA#, F2 is a Member Id.
In the file, PA# was "supposed" to be unique, but it is not.
So I want to identify
all records where same PA# is repeated for the Same member
and in another report,
where same PA# is repeated for different members.
Is it possible using only SQL and/or query. Creating a temporary
intermediate file is OK too.
Any help will be really appreciated.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.