Update Query Expression question

C

Cheyenne

Hi, I have a table with 3 columns. I would like to delete the first 3
numbers in each record in the 'Account Number' column .i.e 000123456Y to
123456Y. Thanks.
 
B

Brendan Reynolds

UPDATE YourTableName SET YourFieldName = Mid$([YourFieldName], 4)

See Mid Function in the help files for details.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
D

Dirk Goldgar

Cheyenne said:
Hi, I have a table with 3 columns. I would like to delete the first
3 numbers in each record in the 'Account Number' column .i.e
000123456Y to 123456Y. Thanks.

Something along thse lines should work, if you paste into SQL view of a
new query:

UPDATE [YourTableName]
SET [Account Number] = Mid([Account Number], 4);

Replace "YourTableName" with the name of your table, and make sure that
the name of the field is correct.
 
C

Cheyenne

It worked like a charm. Thanks.

Dirk Goldgar said:
Cheyenne said:
Hi, I have a table with 3 columns. I would like to delete the first
3 numbers in each record in the 'Account Number' column .i.e
000123456Y to 123456Y. Thanks.

Something along thse lines should work, if you paste into SQL view of a
new query:

UPDATE [YourTableName]
SET [Account Number] = Mid([Account Number], 4);

Replace "YourTableName" with the name of your table, and make sure that
the name of the field is correct.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Top