Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jfm
Posting Yak Master
145 Posts |
Posted - 2012-09-13 : 12:53:25
|
| Hi there, I have an ID_Column. The matter is that the data is as follows: AXBN- JT3AXBN-JT3I have some middle spaces in some cells. I need to remove those spaces, because SQL is recognizing the cells as a different one, due to that middle space. Anyone knows any query to remove it? Many thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jfm
Posting Yak Master
145 Posts |
Posted - 2012-09-13 : 13:02:40
|
| How you will write the query? Using Monthly_Table and Mydatabase. Regards |
 |
|
|
jfm
Posting Yak Master
145 Posts |
Posted - 2012-09-13 : 13:06:18
|
| I used the following query to remove the left and right spaces. But i cant remove the middle ones: UPDATE tableSET ax = replace ( ax, ax, RTRIM(ltrim( ax)))where ax <>''Thanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jfm
Posting Yak Master
145 Posts |
Posted - 2012-09-13 : 13:32:16
|
| Perfect. I used them, because, I'd take info from other columns and they had spaces too. Thanks! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|