|
Posted by Tim Groulx on 01/12/06 02:17
Hello,
I need to be able to select only the numeric data from a string that is
in the form of iFuturePriceID=N'4194582'
I have the following code working to remove all the non-numeric text
from before the numbers, but it is still leaving the single quote after
the numbers, i.e. 4194582'
Any ideas or suggestions how to accomplish that? Thanks in advance.
Declare @TestData varchar(29)
Set @TestData = "iFuturePriceID=N'4194582'"
Select Substring(@TestData, patindex('%[0-9]%', @TestData),
Len(@TestData))
TGru
*** Sent via Developersdex http://www.developersdex.com ***
[Back to original message]
|