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 |
stevenandler
Starting Member
42 Posts |
Posted - 2013-12-20 : 13:02:28
|
I am using SQL 2005 and I'm trying to find a T-SQL command that will allow me to retrieve a sub string based on the token. For instance, if I had a string like this:abc^defgh^ij^klmnop^qrsLet assume the token is the ^ and I want to get the string at the third token klmnop.is there a simple one line command that I can use to retrieve this data? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2013-12-20 : 13:07:34
|
You can use the PARSENAME function if your data has up to four parts.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-21 : 01:06:51
|
quote: Originally posted by stevenandler I am using SQL 2005 and I'm trying to find a T-SQL command that will allow me to retrieve a sub string based on the token. For instance, if I had a string like this:abc^defgh^ij^klmnop^qrsLet assume the token is the ^ and I want to get the string at the third token klmnop.is there a simple one line command that I can use to retrieve this data?
seehttp://visakhm.blogspot.in/2013/05/get-nth-positioned-string-from.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|