Aleks
asked on
replace syntax
I want to remove the '-' character and any spaces ' ' from a string. I am trying to do a double replace but my syntax seems icnorrect.
This seems to work for replacing the '-' but I am not sure what the syntax will be to also remove the spaces
This seems to work for replacing the '-' but I am not sure what the syntax will be to also remove the spaces
(Replace(a.fieldname,'-','') AS fieldnameclear)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great!
What exact language do you need this in.
SQL, asp.net....please tell me so I can provide the best syntax.
Also.
Provice the test strings that cover all scenarios.
In SQL and in most modern programming languages we have a replace or string manipulation function.
If it gets too crazy we can do pattern matching or even regex.
So for 100% answer..please provide your 100% scenario.
Also please provide if you want this to happen in code...versus database. We can do this several ways and in both places.
Thanks,