ccarrieta Posted February 15, 2015 Posted February 15, 2015 I have a table called log, in this table I have several fields that are imported from a different table. There are two fields (A and that are numerical. A will have three different values 1,2,3 and B 10 different values (1-10). I wanted to "recode" the numerical values into different fields in the same table (C and D). For example if A has the number 1, then auto-enter apples in C, if A =2 then auto enter oranges in C, if A is =3 then auto enter peaches in C. The same For B here there will be 10 values each represent a specific item (1=red, 2=blue,3=black, 4=orange.....). I have tried with the case function but I have not been succesful... any help?
comment Posted February 15, 2015 Posted February 15, 2015 Please don't use abstract examples. They are not only extremely difficult to follow; they also lead to less than optimal answers. As it happens, there are several ways to accomplish such "recoding", and the choice depends on the purpose. My guess (!) would be that you need to have a table of "translations", along the lines of : Code Value ---- ---- 1 Apple 2 Orange 3 Peach and use a relationship to display the value that corresponds to the selected code in your source table.
Lee Smith Posted February 15, 2015 Posted February 15, 2015 I deleted your duplicate post. In the future if you think something went wrong, contact a Moderator for assistance. Lee
ccarrieta Posted February 16, 2015 Author Posted February 16, 2015 could this be done by using the case function ? I was trying to do it like this: Case (fieldA="1";Fieldb="Apple") but i keep getting 0
comment Posted February 16, 2015 Posted February 16, 2015 could this be done by using the case function ? It could, but hard-coding data in calculations is not good practice.
Recommended Posts
This topic is 3625 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now