L
LRP2
I have 2 files from a customer that I need to merge into one file.
File 1 has typical columns (ID #, Last name, First Name, Address, City, St
etc)
File 2 has only 2 columns (ID # and Hosp. Aff. Code)
The ID #'s in both files may have multiple listings (in this case the IDs
refer to doctors which may have multiple offices so each office gets its own
listing or row in File 1).
ex: ID # Last name First name City St
100 McCoy Bones OKC OK
100 McCoy Bones Guthrie OK
File 2 has a row for each ID # and Hosp. Aff. Code
ex: ID # Hosp Code
100 OKCMH
100 MWCH
100 GMH
The end result needs to be this:
ID # Last name First name City St Hosp Code
100 McCoy Bones OKC OK OKCMH, MWCH,
GMH
100 McCoy Bones Guthrie OK OKCMH, MWCH,
GMH
Each ID # in File 1 needs to have ALL of the hospital codes from File 2.
Have tried a couple of add-in programs that claim to be able to do this, but
when it hits the different hosp codes for the same ID, it either plugs in the
1st one for all of them or the last one for all of them (ignoring the other
codes completely)
This is a rather lengthy database (9,000 rows of doctors) manually
rearranging the info line by line is not feasible.
Thanks in advance for any info!
File 1 has typical columns (ID #, Last name, First Name, Address, City, St
etc)
File 2 has only 2 columns (ID # and Hosp. Aff. Code)
The ID #'s in both files may have multiple listings (in this case the IDs
refer to doctors which may have multiple offices so each office gets its own
listing or row in File 1).
ex: ID # Last name First name City St
100 McCoy Bones OKC OK
100 McCoy Bones Guthrie OK
File 2 has a row for each ID # and Hosp. Aff. Code
ex: ID # Hosp Code
100 OKCMH
100 MWCH
100 GMH
The end result needs to be this:
ID # Last name First name City St Hosp Code
100 McCoy Bones OKC OK OKCMH, MWCH,
GMH
100 McCoy Bones Guthrie OK OKCMH, MWCH,
GMH
Each ID # in File 1 needs to have ALL of the hospital codes from File 2.
Have tried a couple of add-in programs that claim to be able to do this, but
when it hits the different hosp codes for the same ID, it either plugs in the
1st one for all of them or the last one for all of them (ignoring the other
codes completely)
This is a rather lengthy database (9,000 rows of doctors) manually
rearranging the info line by line is not feasible.
Thanks in advance for any info!