AnotherJob
Programmer
I want to translate string fields in an MS Access table, mapping them to other strings. Now I do that in a VBA loop, iterating through the table and calling a VBA function to map the new values, But I suspect there may be a way to do it just in SQL. Is there?
Suppose I have two tables, like this:
Is there a Jet-SQL query that would update Table1, remapping the STATE values in Table2? In practice my translation table might have thousands of values. Thank you in advance.
Suppose I have two tables, like this:
Code:
Table1 (translantion table)
SOURCE TARGET
Massachusetts MA
Vermont VT
New Hampshire NH
New York NY
Table2 (data table)
CITY STATE
Arlington Massachusetts
Portsmouth New Hampshire
Portland Maine
Is there a Jet-SQL query that would update Table1, remapping the STATE values in Table2? In practice my translation table might have thousands of values. Thank you in advance.