|
-
Dec 2nd, 2008, 09:51 AM
#1
Thread Starter
Addicted Member
SQL Replace Function
I am trying to use the REPLACE function to replace a string. The only problem is, I want it to replace any string besides a certain few.
So I want it to replace anything that is not 'AB', 'AC', or empty string ''. The column can contain many different strings, hardcoding each variation is not feasible, example "REPLACE(Field, 'DD', '')". I'd have to do this for each different variation I find, and I'd rather not do this. Is there a way to have the REPLACE function replace all occurrences not matching "IN ('AB', 'AC', '')"?
Hopefully that makes sense.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|