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)
 phone number 10 digit

Author  Topic 

ayu
Starting Member

43 Posts

Posted - 2009-03-13 : 08:30:42
i have phone column in my table..and there are so many digits phone number..i want to get rid of them and want first 10 digit numbers only..how can i get that?

Thanks!!

410280663X1050
20215151552996396389
0000000000000
15236696347w3555


select phone from orders..????

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-13 : 08:36:15
SELECT phone, LEFT(phone, 10)
FROM Orders



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -