Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I sql How to remove all the spaces in a string

What I have tried:

I tried with Replace but still some spaces are there
Posted
Updated 3-May-18 19:41pm
Comments
Maciej Los 4-May-18 2:01am    
If you've tried Replace(fieldName, ' ', '') function and still there are "spaces", that means that there aren't spaces...

1 solution

Use replace method to replace ' ' with ''.
Example:
SQL
replace(yourStringHere,' ','')
 
Share this answer
 
Comments
Maciej Los 4-May-18 1:54am    
5ed!
I have no idea who have down-voted your answer. This answer is totally correct!
Replace function replaces all instances of specified string with another one.
GKP1992 4-May-18 1:59am    
Thanks. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900