My recommendation would be to use a regular expression replacement (and/or
validate the data) when the phone number is Inserted and then format the
number after the fact. That is, assuming you're able to -- Even if you
already have a db full of data, you can use CF to pull all the existing
data, convert it and then update it in a single batch, then you'll have nice
clean data that you can do anything you want with. The only reason you might
not want to do this is if the db in question is already in use by other
applications ( client-server in particular ) which you have no control over.



hth

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

> I am looking for a function for SQL Server 2000 that will
> strip out all but numbers from the left side of the
> equation.



> Example



> Select cust_id,phone

> From customers

> Where stripchar(phone) = �#phone_just_numbers#�



> Before anyone asks, I know that stripchar is not a real
> function, what I need is a function that performs the task
> of just looking at the numbers.



> Sincerely,

> Ricardo M. Sanoja





> Senior Web Architect

> 4288 Kellway Circle

> Addison, TX. 75001

> 972.267.1558 Ext. 219

> HYPERLINK
> "mailto:[EMAIL PROTECTED]"mailto:[EMAIL PROTECTED]




> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.384 / Virus Database: 216 - Release Date:
> 8/21/2002




-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to