Remove a Blank Space

  • Hello Everyone

    This may seem simple to some, but I have been sitting around here polishing up my SQL coding skills and ran into this little problem.

    We all know how to remove blank space(s) from a string that are on either end. But how would you remove a blank space that is in the middle. Such as if the string is: 'New York' and you want the result to look like this: 'NewYork'

    Thanks

    Andrew

  • REPLACE(String,' ','')

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Thanks

    I thought about the replace function right after I posted. It has been a long week.

    Thanks

    Andrew

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply