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 |
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-11-23 : 09:52:10
|
| Dear All,I have phonenumber field in cst table.And the data in that be for eg '07712345678'I need to insert space after 5th number ie '07712 345678'How to do this.Any help would be highly appreciated.ThanksSG |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-11-23 : 09:54:27
|
| update cstset phonenumber = stuff(phonenumber ,6,0,' ')==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-11-23 : 09:54:28
|
[code]select stuff('07712345678', 6, 0, ' ')[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-11-23 : 10:06:02
|
| Its working!Thank you all!! |
 |
|
|
|
|
|