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 2005 Forums
 Transact-SQL (2005)
 parsing out the numbers

Author  Topic 

duhaas
Constraint Violating Yak Guru

310 Posts

Posted - 2010-01-04 : 09:13:25
I have a field called LongName(varchar(256)), and LongName returns output like this:

LongName
55%_65%_Equity

I want to be able to select this field basically into two:
high,low
55,65

basically stripping out the numbers and creating two fields one call high and one called low

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-01-04 : 09:20:26
make use of this fnParseString


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-01-04 : 09:26:05
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/18/extract-only-numbers-from-a-string.aspx
http://sqlblogcasts.com/blogs/madhivanan/archive/2009/11/18/parsing-a-string.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -