[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Sql update (substr) statement

Posted on 2007-10-03
1
Medium Priority
?
5,047 Views
Last Modified: 2013-12-19
i have a phone number in the format of      (561) 297-3060 substr statement. I want it to update it with a sql statement to  5612973060.
0
Comment
Question by:rrisal
1 Comment
 
LVL 35

Accepted Solution

by:
johnsone earned 2000 total points
ID: 20009743
Is the format always the same?  If so, this should work.

update <tab>
set <col> = substr(<col>, 2, 3) ||
substr(<col>, 7, 3) ||
substr(<col>, 11);

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question