remove or add a prefix

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
 
B

Bob Quintal

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top