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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-01-11 : 08:16:01
|
| Mike writes "I have a table in a database. It has an ID and a string with delimiters.ID STRING-- -------1 Great:Not Great ; Wonderful:Not Wonderful2 New:Old ; Broken:FixedI can use the SUBSTRING to get the first set, but on the last set. Split1 Split2 Split3------ --------- -------Great Not Great Wonderful:Not WonderfulNew Old Broken:FixedThere are two delimiters, one for the group ";" and the other for the pair ":". It is also possible to have X number of groups in the row. How would I parse this into separate rows to look like something below?Split1 Split2 Split3 Split4------ --------- ------- ------Great Not Great Wonderful Not WonderfulNew Old Broken FixedThank you!Mike" |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-01-11 : 10:50:43
|
| Write ur own function to do the task.Check for the String related functions in BOL |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2006-01-12 : 03:24:03
|
| I have put some functions here [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50044[/url] that may start you off. There are also some other links in that thread that you may find usefulsteve-----------Facts are meaningless. You could use facts to prove anything that's even remotely true! |
 |
|
|
|
|
|