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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 parsing a string

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2006-09-01 : 03:15:15
can someone help me.
I have a very long string.

in it is the words

country: countryname
city: cityname

how can I just pull out of the long string those 2 values?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-09-01 : 03:23:15
use charindex or patindex to find the occurance of it in the long string and use substring to extract it


KH

Go to Top of Page
   

- Advertisement -