Home > DeveloperSection > Forums > SQL Server Spaces within a string
Jeet Verma
Jeet Verma

Total Post:110

Posted on    November-06-2014 3:37 AM

 MSSQL Server SQL Server  SQL 

 1 Reply(s)
 566  View(s)
Rate this:

I need to add spaces within a string.

Original String: up70aert55
Expected Result: up 70 aert 55

Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    November-06-2014 6:26 AM

can achieve this with LEFTSUBSTRINGRIGHT functions.

SELECT LEFT('up70aert55',2)+' '+
SUBSTRING('up70aert55',3,2)+' '+
SUBSTRING('up70aert55',5,4)+' '+

Modified On Nov-06-2014 06:27:07 AM

Don't want to miss updates? Please click the below button!

Follow MindStick