0

I have 2 tables:

  1. Table A: code | name

  2. Table B: barcode | name

Table B has full barcode and name, Table A has only code.

I need to run update query that fill name in Table A.

I tried something like:

update A set name = (select top 1 Name from B where B.Code = mid(A.Barcode,1,8))

but it doesn't work.

1
  • 2
    At first glance, it seems it should work. what is the error? Commented Mar 8, 2010 at 9:23

1 Answer 1

2

Name is a reserved word, you need to put it in square brackets: [name]

In general, fields (columns) should not be named with reserved words.

List of reserved words in Access 2002 and in later versions of Access

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.