remove or add a prefix

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables that are linked to our ODBC database. I cannot edit the
data in these tables. One table has a prefix to the part number and the
other does not. Is there a way that I could you the make table query tool to
either delete the first four characters from one table or add the first four
to the other. I am using access 2000.

Thank you

Chris
 
I have two tables that are linked to our ODBC database. I cannot
edit the data in these tables. One table has a prefix to the part
number and the other does not. Is there a way that I could you
the make table query tool to either delete the first four
characters from one table or add the first four to the other. I
am using access 2000.

Thank you

Chris
Which way do you prefer?

To remove the first four characters of a field in a query, type this
in an empty column of the query grid
newFieldName: mid([tablename].[oldFieldName],5)

To add a four character prefix to a different field in the query,
SecondNewName: "ABCD" & [tablename].[fieldname]

You can also join the two tables in the query by setting the
criteria in the shorter field to "ABCD" & [tablename].[fieldname]
 
Back
Top