Hi Guys,
How can I format a phone number in SQL that has the dashes back to no dashes? i.e. 444-44-4444 needs to now be 444444444 ?
I tried just pulling it into Crystal and using the picture function but that did not work. I need to remove the dashes before it gets to Excel/Crystal.
Can I use the replace command somehow?
replace (phone, '-', ' ') I tried this but is this more of an update and not part of the select?
2 8165 azimmer 200
Recognized Expert New Member
Hi Guys,
How can I format a phone number in SQL that has the dashes back to no dashes? i.e. 444-44-4444 needs to now be 444444444 ?
I tried just pulling it into Crystal and using the picture function but that did not work. I need to remove the dashes before it gets to Excel/Crystal.
Can I use the replace command somehow?
replace (phone, '-', ' ') I tried this but is this more of an update and not part of the select?
Your replace seems fine, what do I miss? It's OK to be used in a select like this: -
SELECT replace(phone, '-', '') as phone_nodash
-
FROM mytable
-
NB: There's no space in the replace "to" string.
Your replace seems fine, what do I miss? It's OK to be used in a select like this: -
SELECT replace(phone, '-', '') as phone_nodash
-
FROM mytable
-
NB: There's no space in the replace "to" string.
Got it! Thanks soooooooooooooo oooo much!!!!!! - Jo
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: joemono |
last post by:
Hello everyone!
First, I appologize if this posting isn't proper "netiquette" for this
group.
I've been working with perl for almost 2 years now. However, my regular
expression knowledge is pretty limited. I wrote the following expression to
take (hopefully) any _reasonable_ phone number input, and format it as
(999) 999-9999 x 9999.
|
by: AnnMarie |
last post by:
<script language="JavaScript" type="text/javascript">
<!--
function validate(theForm)
{
var validity = true; // assume valid
if(frmComments.name.value=='' && validity == true)
{
alert('Your full name is required. Please enter your full name!');
validity = false;
frmComments.name.focus();
|
by: deko |
last post by:
The below code dials a phone number using C:\Program Files\Windows
NT\dialer.exe. The problem is that dialing rules are ignored. MS Knowledge
Base Article 266253 suggests that entering the phone numbers in canonical
format, e.g. +011 (408) 2578652, will fix the problem -- but I tried and it
didn't work.
I'm wondering if anyone can recommend an alternate phone dialer --
preferable one that does not use a GUI like dialer.exe, which...
|
by: Mark Basham |
last post by:
Overview...
I want to use a web service provided by a third party from vbscript in a
..asp page.
I have created a proxy wrapper for the service and regitered it for Com
interop.
The new wrapper can successfully be called from .Net and a VB Com
object.
|
by: Brian Henry |
last post by:
I have phone numbers like this in a data table
123-435-1234
1231231234
432.234.2321
they all have different formatting, what I want to do is get them all
formatted like this
(123) 123-1234
| |
by: Earl |
last post by:
I'm curious if there are others who have a better method of
accepting/parsing phone numbers. I've used a couple of different techniques
that are functional but I can't really say that I'm totally happy with
either.
1. My first technique was to restrict the users to entries that could only
be 3 character, 3 characters, 4 character (area code, prefix, suffix,
respectively). I would null out any inputs that were non-numeric (except the...
|
by: laredotornado |
last post by:
Hi,
Using php 4.4.4, I am looking to parse a US phone number string into 3
smaller strings -- area code, the first part of the phone number (3
digits) and the last part of the phone number (4 digits). The only
given is that there will be 10 digits in the string, but people may
include spaces, parens, or other characters. These are all strings
I'd expect
$p = "5558675309";
|
by: lim4801 |
last post by:
I am currently in doing a program which is given by my tutor:
Contemplate that you are working for the phone company and want to sell "special" phone numbers to companies. These phone numbers are "special" because they are easily translated into words. You've been asked to create a list of phone numbers that are directly mappable to words by searching a dictionary for every 7 or 10 letter word that maps on to the phone lettering scheme:
...
|
by: Propoflady |
last post by:
My contacts can have as many as five or six phone numbers - is it
possible to make a query that puts the name, and each phone number
after it on the same line - for this reason I have two tables - client
and phone linked by client id
right now I get
contact a - phone number 1
contact a - phone number 2
I would like
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |