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 2008 Forums
 Transact-SQL (2008)
 Remove alpha from alphamueric

Author  Topic 

shilpash
Posting Yak Master

103 Posts

Posted - 2013-06-17 : 11:35:24
how to remove alpha from alphanumeric.Eg
column has a data='565ab45'
just want to get 56545.

Also some column has pipedelimeter ,wondering how to remove that too.
like-123||209L1||W1|
jUST WANT TO GET 123209L1W1

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-17 : 11:52:14
http://beyondrelational.com/modules/2/blogs/70/posts/10821/extract-only-numbers-from-a-string.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2013-06-17 : 11:57:08
And for the Pipe one, you can use Replace function

select REPLACE('123||209L1||W1|','|','')

Cheers
MIK
Go to Top of Page

shilpash
Posting Yak Master

103 Posts

Posted - 2013-06-17 : 12:02:46
Thanks that works
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-18 : 00:34:45
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -