Marcus Aurelius
asked on
How to replace WHITESPACE (1 or more spaces) in a field with a SINGLE DASH?
My field has data like this:
1P0007.63579.0000 1609168541 899972053 1230
I need to remove all spaces (1 or more) and replace the blank space with a single dash '-' like this:
1P0007.63579.0000-16091685 41-8999720 53-1230
Can someone tell me what SQL Code to use?
1P0007.63579.0000 1609168541 899972053 1230
I need to remove all spaces (1 or more) and replace the blank space with a single dash '-' like this:
1P0007.63579.0000-16091685
Can someone tell me what SQL Code to use?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A similar method could be used with the scripting function in SSRS if you are generating a report.
ASKER
MANY, MANY THANKS!
Now please see my new question related to this...here:
https://www.experts-exchange.com/questions/28967659/How-to-CONCANTENATE-ROWS-of-data-into-a-flat-single-ROW.html
Now please see my new question related to this...here:
https://www.experts-exchange.com/questions/28967659/How-to-CONCANTENATE-ROWS-of-data-into-a-flat-single-ROW.html