View Single Post
  #2  
Old March 5th, 2006, 09:51 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Update field based on current value

IIF(tblName[FieldName] ='abc', '123', IIF(tblName[FieldName] = 'bcd', '234',
IIF(tblName[FieldName] = ...etc...)))

HTH;

Amy

"JR" wrote in message
oups.com...
I need to update all values in a database column to new values. The
way it works is basically:

if = abc replace with 123
if = bcd replace with 234
if = cde replace with 345
if = def replace with 456

Now the values used above are just for example it's not really pattern
orientated. I can create four update queries for this, however was
hoping there was a way to do this in one shot. Is there a single
update query that could update the source values with new values based
on rules like the above?

Thanks.

JR