Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Replace Function

Author  Topic 

michpaust
Starting Member

21 Posts

Posted - 2006-05-01 : 11:32:41
I am not sure if this can be done but I am asking anyway. I am working with a query in Access 2003.I have a Customer Order table that has data for customers orders as well as the location of the customers. I am looking at a field called Confirmed. This field has two values, yes or no. The problem that I am having is this. One of the program managers would like me to replace the value "YES" with the region value e.g. Northwest. So in theory what I would like to do is say If Region=Northwest replace the value in confirmed with the value "NW". i have been working on this since last Friday and pratically ruined my weekend thinking about it. Am I missing something or can this just not be done?

Any help will be appreciated.

--I don't suffer from insanity. I enjoy every minute of it.--

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-05-01 : 13:12:00
Check whether the following helps u (but before anything else backup ur data)

Update Customer_Order Set confirmed = 'NW' where Region = 'Northwest'

Srinika
Go to Top of Page

michpaust
Starting Member

21 Posts

Posted - 2006-05-01 : 13:48:55
That worked perfectly. I was so focused on replace I didn't think of update

Thank you!!!!!

--I don't suffer from insanity. I enjoy every minute of it.--
Go to Top of Page
   

- Advertisement -