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 issue

Author  Topic 

Job
Yak Posting Veteran

69 Posts

Posted - 2005-08-15 : 12:35:23
I have one of my fields that has data similar to the following;

65M,9.3,4.3,5,0,,,

I always want to parse out the second set or '9.3' in the example. I know there is not a Split function, however is there a way to use Substring and Charindex to pull that data on the fly and use in an Update?

Cheers,

Job

Job
Yak Posting Veteran

69 Posts

Posted - 2005-08-15 : 12:57:56
Ok, I figured it out using a function I found on the net.

SUBSTRING(TxnUnits,dbo.InString(TxnUnits, ',', 1)
,dbo.InString(TxnUnits, ',', 2)-dbo.InString(TxnUnits, ',', 1)-1)
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-08-15 : 13:10:05
While your at it look up First Normal Form on the internet ... it might help you out as well ...

Jay White
Go to Top of Page
   

- Advertisement -