if statement

R

RhondaR

Hi. I have a text field (each one with a different number of characters)
where some of the records at the end of their sentence contain "(CA)", or
"(CA", or neither one.

I need to find all the "(CA" records and change them to "(CA)", while
leaving all the other records alone.

How do I write the update statement? All I have so far is Like "*(*"

Thanks!
Rhonda
 
F

fredg

Hi. I have a text field (each one with a different number of characters)
where some of the records at the end of their sentence contain "(CA)", or
"(CA", or neither one.

I need to find all the "(CA" records and change them to "(CA)", while
leaving all the other records alone.

How do I write the update statement? All I have so far is Like "*(*"

Thanks!
Rhonda

A permanent change?
Create an Update query.
Back up your table first.

Update YourTable Set YourTable.[FieldName] =
Left([FieldName],Len([FieldName])-3) & "(CA)"
Where Right([FieldName],3) = "(CA";
 
Top