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 2000 Forums
 Transact-SQL (2000)
 Removing characters and spaces from a field
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

waxdart23
Starting Member

United Kingdom
33 Posts

Posted - 06/08/2005 :  04:14:36  Show Profile  Visit waxdart23's Homepage  Reply with Quote
I am currently trying to convert some phone number data which has been entered with spaces for formatting and in some cases with text. Is there a way of removing all spaces and text from this field leaving just the numbers?

Thanks

Thanks
P

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 06/08/2005 :  04:19:43  Show Profile  Send jen a Yahoo! Message  Reply with Quote
without sample data and ddl, you can use replace (search and read bol)

--------------------
keeping it simple...
Go to Top of Page

waxdart23
Starting Member

United Kingdom
33 Posts

Posted - 06/08/2005 :  04:35:01  Show Profile  Visit waxdart23's Homepage  Reply with Quote
Thanks

Thanks
P
Go to Top of Page

vivek.kumargupta
Starting Member

India
45 Posts

Posted - 06/08/2005 :  04:41:34  Show Profile  Reply with Quote
U can also use rtrim and ltrim functions to cut the spaces u do not require.

Thanks,
Vivek
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.07 seconds. Powered By: Snitz Forums 2000