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 |
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-10-12 : 06:31:07
|
| Hi friends,My input is 'Multples_1ST_0000010201'I want reSult like thisMultples 1ST 0000010201 |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2009-10-12 : 06:32:45
|
| select 'Multples_1ST_0000010201',replace('Multples_1ST_0000010201','_', ' ') |
 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-10-12 : 06:32:49
|
| Hi,Try this onceSelect Replace('Multples_1ST_0000010201','_',' ') |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-10-12 : 06:37:22
|
| i want as 3 columnsMultples as 'col1' 1ST as 'col2' 0000010201 as 'col3' |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-10-12 : 06:41:57
|
quote: Originally posted by shaggy i want as 3 columnsMultples as 'col1' 1ST as 'col2' 0000010201 as 'col3'
Try thisselect parsename(replace('Multples_1ST_0000010201','_','.'),3) as col1,parsename(replace('Multples_1ST_0000010201','_','.'),2) as col2,parsename(replace('Multples_1ST_0000010201','_','.'),1) as col3Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-10-12 : 06:44:12
|
| thanks senthil |
 |
|
|
|
|
|
|
|