Jump to content

Trimming Middle Spaces


zezu10

Recommended Posts

Hi guys,I currently have registration numbers that are set out as 'AAA AAAAA' for example.I need these joined into one, so they come out as 'AAAAAAA'Could anyone help me as in what code I should be using? I had been looking at Trim but couldn't get it working.

Link to comment
Share on other sites

in sql server 2000, you could useselect replace('AAA AAAAA' ,' ','')
I've tried this;SELECT REPLACE(COLUMNNAME, " ", "")FROM TABLEBut I get this error - Server: Msg 1038, Level 15, State 3, Line 1Cannot use empty object or column names. Use a single space if necessary.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...