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 |
smithsf22
Starting Member
9 Posts |
Posted - 2006-12-21 : 09:37:40
|
Hello,I have been trying to do this for a while with no luck. Is there a way to break a string like this 06-26-002-30-1 so it will display like in 5 different columns like 06 26 002 30 1 within a view?Thank you |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-21 : 09:44:54
|
1 If you store the data hyphen seperated, you should consider Normalisation2 If you use front end application like Vb, make use of split functionSplit(col,"-")3 http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648 - to do it in sqlMadhivananFailing to plan is Planning to fail |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-21 : 09:50:12
|
Use this function here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76033select blablabla,dbo.fnParseString(5, ' ', yourcolumn),dbo.fnParseString(4, ' ', yourcolumn),dbo.fnParseString(3, ' ', yourcolumn),dbo.fnParseString(2, ' ', yourcolumn),dbo.fnParseString(1, ' ', yourcolumn)from <yourview>Peter LarssonHelsingborg, Sweden |
 |
|
smithsf22
Starting Member
9 Posts |
Posted - 2006-12-21 : 10:10:10
|
Great... thanks for the help got it |
 |
|
|
|
|
|
|