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
Marshall Barton - 10 Mar 2008 00:46 GMT
>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
[quoted text clipped - 4 lines]
>
>How do I write the update statement? All I have so far is Like "*(*"
UPDATE thetable SET thefield = thefield & ")"
WHERE thefield Like "*(CA"

Signature
Marsh
MVP [MS Access]
fredg - 10 Mar 2008 00:47 GMT
> 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
[quoted text clipped - 7 lines]
> 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";

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail