Update Query Expression question

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

Guest

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.
 
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.
 
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.
 
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)
 

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

Back
Top