---
title: "SQL Server Spaces within a string"  
description: "SQL Server Spaces within a string"  
author: "Anonymous User"  
published: 2014-11-06  
updated: 2014-11-06  
canonical: https://www.mindstick.com/forum/2529/sql-server-spaces-within-a-string  
category: "mssql server"  
tags: ["sql server", "sql"]  
reading_time: 1 minute  

---

# SQL Server Spaces within a string

I need to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) spaces within a [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp).

```
Original String: up70aert55
Expected Result: up 70 aert 55
```

## Replies

### Reply by Takeshi Okada

can achieve this with LEFT, SUBSTRING, RIGHT functions.\

```
SELECT LEFT('up70aert55',2)+' '+SUBSTRING('up70aert55',3,2)+' '+SUBSTRING('up70aert55',5,4)+' '+RIGHT('up70aert55
```


---

Original Source: https://www.mindstick.com/forum/2529/sql-server-spaces-within-a-string

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
