Recoding in MS Access

Ramshan

Registered User.
Local time
Today, 13:56
Joined
Aug 17, 2011
Messages
48
Hi everyone.
Is that possible in access for recoding the values in a table? That is I have a field called County in my table which is in number format. But each of these number refer to one county, example Adair = 112, alfalfa = 156 etc. So now I have to create a new column named CountyName and relate these names to those numbers??
 
Yes, but you probably shouldn't. Do you have any other data related to county (i.e. state it is in, population, etc?)

What you should do is leave it numbers and then when you need the county name retreive it from a County table that has both that number and the County name.
 
Hi Plog, I will clearly explain the proble,
consider the following table
CountyID CountyName
109 -
156 -
.
.
.
This goes on like this till 50000 records with many redunant values,,,, I have the values for these numbers that is 156 = Adair, 109 = alfalfa in a separate word doc. Since I am having some 50000 records I can't go and type these names for all the numbers individually. Now I am looking for an alternate option where I could just insert the logic like
If CountyID = 109 then CountyName = Adair
else
If CountyID = 156 then CountyName = Alfalfa
etc,,,But I dont know where to and how to insert this logic,,,hope you would have understood the problem
 
>>> I can't go and type these names for all the numbers individually <<

But that's exactly what you will be doing if you code a conditional statement like the one you proposed.

I would try and turn that .doc into a table in Access. First try pasting the document into excel, saving it and importing it into Access as the County table I proposed. If that doesn't work, paste the data from the document into a plain text file and try importing it.
 
Hi Ramshan,

How about importing that word document as a table, then using a query, joining your original table and the imported table using the ID as the join?

You can then get a list of CountyID and CountyName which are matching.
 

Users who are viewing this thread

Back
Top Bottom