Apr 22, 2013 #1 admoore IS-IT--Management May 17, 2002 224 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 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.
Apr 22, 2013 1 #2 r937 Technical User Jun 30, 2002 8,847 CA sure, but you have to use the REPLACE function to replace those characters with null strings r937.com | rudy.ca Buy my new book Simply SQL from Amazon Upvote 0 Downvote
sure, but you have to use the REPLACE function to replace those characters with null strings r937.com | rudy.ca Buy my new book Simply SQL from Amazon
Apr 22, 2013 Thread starter #3 admoore IS-IT--Management May 17, 2002 224 US I actually opted to fix the data before selecting it... Code: UPDATE teble SET phone = REPLACE(phone,'-',''); Upvote 0 Downvote
I actually opted to fix the data before selecting it... Code: UPDATE teble SET phone = REPLACE(phone,'-','');