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 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-04-20 : 10:19:36
|
| How is it possible to separate a varchar(50) value such as 'WTI NYMEX:AL LME'into 'WTI NYMEX' and 'AL LME'i.e. separated by :Thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-20 : 10:24:37
|
| [code]select parsename(replace('WTI NYMEX:AL LME', ':', '.'),2), parsename(replace('WTI NYMEX:AL LME', ':', '.'),1)[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-04-20 : 10:49:01
|
| Are there only two "components", or an unlimited number?If only two then go with Harsh's answerKristen |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|