Selecting certain strings and pruning em'

kupe

Registered User.
Local time
Today, 23:13
Joined
Jan 16, 2003
Messages
462
About 30k records in the one field of a large database have a four-character prefix that I need to remove. Some records don't have this prefix, and are fine.

Is there a way please to trim the strings, by choosing each record in "Field1" that is prefixed by these four characters - "like accs" - and to remove the characters, please?

I've been trying for some time now. I end up with lots of queries, but no way of getting them back together again. Perhaps someone's done this recently and knows the answer. Be very grateful to hear it.
 
In a query, create a new field:

NewField: IIf(Left([Field1], 4) = "accs", Mid([Field1], 5), [Field1])
 
Very neat. That's really good, works a treat. Thanks very much, MoP. Cheers to you.
 
Hi Mile-O-Phile

The New Field method has been great to remove "www." from a vast number of urls.

But no matter how I adjust the Immediate If, I am left with stragglers such as these

www-users.york.ac.uk
wwww.computerwoche.de
wwww.einet.net
wwwnet.nl

And oddly enough, this one
www.yu

Could I use a wildcard or something similar to get rid of the remainders - almost 200 of them?
 
Sorry, MoP, I see the fault. Cheers.
 

Users who are viewing this thread

Back
Top Bottom