Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Remove alpha from alphamueric
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shilpash
Posting Yak Master

103 Posts

Posted - 06/17/2013 :  11:35:24  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 06/17/2013 :  11:52:14  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 06/17/2013 :  11:57:08  Show Profile  Reply with Quote
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 - 06/17/2013 :  12:02:46  Show Profile  Reply with Quote
Thanks that works
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 06/18/2013 :  00:34:45  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000