Remove part of a string

CEB

Registered User.
Local time
Today, 00:28
Joined
Jan 3, 2005
Messages
25
Hi folks,
I have a table with the words "Church of (whatever)" in one of the records. I am attempting to do an update query to remove the "Church of" part but leave the remaining part of the string. I am using a combination of Format and left but am not having any look. Any suggestion are much appreciated.
Thanks
Colin.
 
If "Church of " is ALWAYS the left most characters.
Newvalue = RIGHT([MyCol],LEN([MyCol]) - 10)
now you can use this in query, or VBA or whatever.

UPDATE MyTable
SET MyCol = RIGHT([MyCol],LEN([MyCol]) - 10)
WHERE [MyCol] Like "Church of *"
AND LEN([MyCol]) > 10

as an example
 
Fofa, thank you very much for that...it worked great!
Colin
 

Users who are viewing this thread

Back
Top Bottom