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)
 Get RIGHT characters

Author  Topic 

Jonny1409
Posting Yak Master

133 Posts

Posted - 2008-08-12 : 04:02:55
Hello,

I have a field which contains data as per below :

/10
/3.2
/14
/45
*22
etc, etc, etc.

I basically want the get the numbers out of this field, thus ignoring any slashes or asterisks etc.

How can I do this please, as the number of characters to the right could vary between 1 character and 5 characters ?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-12 : 04:18:56
look for REPLACE function in books online.
Go to Top of Page

Jonny1409
Posting Yak Master

133 Posts

Posted - 2008-08-12 : 04:35:24
Thanks visakh16 - that's excellent, I've solved my problem.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-12 : 04:51:06
SUBSTRING(Col1, 2, 8000) ?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -