SQL Server Forums
Profile | Register | 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
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shilpash
Posting Yak Master

101 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
52309 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
1052 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

101 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
52309 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  
 New 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.05 seconds. Powered By: Snitz Forums 2000