MS Access 2003 replacing a text string in a table with a specific number

25 pts.
Tags:
Microsoft Access 2003
text strings
I am using MS Access 2003. I have two text strings, "no avail" and "not available", and empty data boxes in a table. I need to replace the "no avail" and "not available" strings with the number "-5" and the empty data boxes with "-1". Is there a way to do this in a table or a query? Also, the table that this data is in is linked. Any help you can provide will be greatly appreciated. Thank you. Silvia

Answer Wiki

Thanks. We'll let you know when a new response is added.

Just use an UPDATE QUERY. <a href=”http://599cd.com/tips/access/update-query?key=ITKnowledgeExchange”>Here’s a tutorial</a>

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ProgrammingGal
    Hello, I don't know the answer to this question in code but the logic should go something like this: You should try to make the strings "not available" and "no avail" into String variables and then set them with something like Set a = "not available" to Set a = -1 & "". I thing this should work. However if you are trying to make a string into an integer this will never work. Good Luck Jan
    30 pointsBadges:
    report
  • Apickel
    update <tablename> set <columntobeupdated> = '-5' where <columntobeupdated> = 'no avail' or where <columntobeupdated>='not available' update <tablename> set <columntobeupdated> = '-1' where <columntobeupdated> is null
    350 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following