Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return numbers only in SELECT query? 1

Status
Not open for further replies.

admoore

IS-IT--Management
May 17, 2002
224
0
0
US
I have a query that includes a VARCHAR field with phone numbers formatted in a variety of ways, i.e. 999-555-1212, (999) 555-1212, etc...

Can a select query return only the numeric data in the record, in this case 9995551212 ?

TIA,

-Allen M.
 
I actually opted to fix the data before selecting it...

Code:
UPDATE teble SET phone = REPLACE(phone,'-','');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top