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 |
|
maruti
Starting Member
1 Post |
Posted - 2010-08-09 : 20:45:14
|
| Hai i am working on sqlserver 2000. I need to split a column into two columns using delimiter space.Can any one help me..Ex:- column_Name sppz, kualampur pesde, phunignerscolumn like that i need result likecolumn1 sppz pesde column2 kualampur phunignersthankyou for advance |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-08-09 : 21:46:30
|
[code]select col, col1 = left(col, charindex(',', col) - 1), col2 = right(col, len(col) - charindex(',', col))from yourtable[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-10 : 13:22:38
|
| will format of string values in column be always consistent? ie. will there be a comma separating two words always?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|