S
Slink
I've got a challenge that many may have when importing a database in
mysql and not sure which is the better tool to use as I'm using Excel
but can use Access. I have a great list of doctors that also has their
specialties. Every doctor listing has a listing ID. The problem is as
follows - if a doctor has more than 1 specialty, there is a second
listing that has its own unique ID. For this to work, this needs to be
a one to many relationship where there is one unique ID for listing
and that listing is used to display in different categories.
Let's say my spreadsheet is set up as follows:
ListingID ListingName Address ListingSpecialty
111 Joe 1 Park Heart
112 Jane 2 Broadway Blood
113 Jim 3 Main Nose
114 Jim 3 Main Ear
115 Jim 3 Main Throat
So I'd like to create a function or query that will see if the cell
for the name of the doctor is the same (ListingName and Address), then
it would use the same listing IDnumber. This way if I import it into
an application, the application will read in the same listing number
and will automatically associate the "duplicate" IDs as being a second
specialty. This application already knows what to do with the
duplicate ID and can read the ListingSpeicalty field and create the
multiple association of that listing. So in this example, Jim is
listed three times. The numbers are unimportant and can be renumbered.
But what I want to do is have the numbers renumbered as 111, 112, 113,
113, 113 because Jim is the same listing.
At first I thought of converting names and address field and combine
and convert to integers but I'd have to think that through and there
must be a better way, macro, query, etc. I've got about 200,00 doctors
so that's why manual solutions wont work. Any ideas? Suggestions much
appreciated!
mysql and not sure which is the better tool to use as I'm using Excel
but can use Access. I have a great list of doctors that also has their
specialties. Every doctor listing has a listing ID. The problem is as
follows - if a doctor has more than 1 specialty, there is a second
listing that has its own unique ID. For this to work, this needs to be
a one to many relationship where there is one unique ID for listing
and that listing is used to display in different categories.
Let's say my spreadsheet is set up as follows:
ListingID ListingName Address ListingSpecialty
111 Joe 1 Park Heart
112 Jane 2 Broadway Blood
113 Jim 3 Main Nose
114 Jim 3 Main Ear
115 Jim 3 Main Throat
So I'd like to create a function or query that will see if the cell
for the name of the doctor is the same (ListingName and Address), then
it would use the same listing IDnumber. This way if I import it into
an application, the application will read in the same listing number
and will automatically associate the "duplicate" IDs as being a second
specialty. This application already knows what to do with the
duplicate ID and can read the ListingSpeicalty field and create the
multiple association of that listing. So in this example, Jim is
listed three times. The numbers are unimportant and can be renumbered.
But what I want to do is have the numbers renumbered as 111, 112, 113,
113, 113 because Jim is the same listing.
At first I thought of converting names and address field and combine
and convert to integers but I'd have to think that through and there
must be a better way, macro, query, etc. I've got about 200,00 doctors
so that's why manual solutions wont work. Any ideas? Suggestions much
appreciated!