Rick said:
hi all,
once again i find myself in need of the expert advice i have always found
here.
i have a series of alpha/numeric values in a table column like this:
3A1111
3A1112
3A1113
3A1114
3A1115
...
3Z9999
what i need to do is to change the alpha letters to a numeric value, such as:
A to 10 for 3101111
B to 11 for 3111112
C to 12 for 3121113
D to 13 for 3131114
...
thru
Z to 36 for 336....
can some kind person point me in the right direction to accomplish this.
thanks a lot!
more info which may help determine a solution. i have imported a data table
from an accounting application that has many colums. the first column
contains a value such as 3a1234 which is a reference number that refers to an
invoice number in the same table.
the reference numbers are unique alpha numeric values.
in the table imported, they range from 300000 thru 399999, from 3A0000 thru
3Z9999, from 3a0000 thru 3z9999. the second position can be alpha or numeric
and if alpha, can be lower or upper case.
i need to import values from this table into another database that will only
allow numeric values in the reference field.
i tried karl's method and that semi worked. it did change the values when i
ran the query, but did not change the values in the table that i needed them
changed in.
i have appened the data from the imported table to a new table named
omd_order_header. this is the table that has the column named OHeader_id that
contains the reference values. i need to update the values in this column in
this table.
Karl's method created a select query, but did not update the OHeader_ID
field in the omd_order_header table. here is the code i used:
SELECT omd_order_header.OHeader_ID,
Replace([omd_order_header.OHeader_ID],[Alpha],[Numeric]) AS Translated
FROM omd_order_header, conversion_alpha_to_numeric
WHERE (((Right(Left([omd_order_header.OHeader_ID],2),1))=[Alpha]));
this creates a 2 column table with OHeader_ID and Translated. the Translated
column contains the updated reference values but nothing is changed in the
OHeader_ID column in the omd_order_header table.
hope this helps. i really need to figure this out. i have approximately 197k
records with the reference number that need to changed.
thanks again