If then in Access SQL or macro

  • Thread starter dksj67 via AccessMonster.com
  • Start date
D

dksj67 via AccessMonster.com

I would like to write a query or macro in Access 2003 that will go through a
table and perform the following function:

If text in FieldName starts with letter "Z" then make value in FieldName2 =
"". What is the quickest way to go about this task?

Dan Kreiling
 
M

Marshall Barton

dksj67 said:
I would like to write a query or macro in Access 2003 that will go through a
table and perform the following function:

If text in FieldName starts with letter "Z" then make value in FieldName2 =
"". What is the quickest way to go about this task?


UPDATE table SET FieldName2 = ""
WHERE FieldName Like "Z*"

When making this kind of semi global change to data, be sure
to make a backup copy of your data table so you can recover
the original data if anything goes off the rails.
 

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