It  will work but you would have to run it 3 times, once to replace the left 
parenthesis, once to replace the right parenthesis, and once to replace the 
dash.

A simpler way, assuming all phones are formatted identically, would be:

UPDATE YourTable SET Phone = (SGET(Phone,3,2) + SGET(Phone,3,7) + 
SGET(Phone,4,11))

I am sure there are other ways of doing it.

 

Javier,

 

Javier Valencia, PE

14315 S Twilight Ln

Olathe, KS 66062

913-915-3137

 

 

 

From: 'Karen Tellef' via RBASE-L <[email protected]> 
Sent: Tuesday, February 18, 2025 3:48 PM
To: [email protected]
Subject: Re: [RBASE-L] - Phone number format

 

 

Use one or a series of "SRPL", like this:

 

UPDATE table SET phone = (SRPL(phone, '(', '', 0))

 

The second criteria is two quotes together with no space between.  You could 
use that with the hyphens also.  But if you're doing this in 6.5, I can't 
remember if 6.5 allowed you to do the two quotes to remove data, I think this 
was added in a later version

 

If not, you might have to write a cursor thru each row and extract each chunk 
using SGET

 

Karen

 

 

 

On Tuesday, February 18, 2025 at 02:50:17 PM CST, Tom Hart <[email protected] 
<mailto:[email protected]> > wrote: 

 

 

My database is over 20 years old and I finally retired so I'm updating my of 
database.  When I originally put in phone numbers I put in as (123)-123-1234, 
then at some point later on I found format mask.  I now want to correct all my 
phone numbers to just a string 1231231234.  What would be the easiest way to 
accomplish this?

 

Tom Hart

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion visit 
https://groups.google.com/d/msgid/rbase-l/CABX9BNeEX33VSjW-4L2G6nvget5PHrfteLpq0g8C1%3Dm%3DL%3DY7BQ%40mail.gmail.com
 
<https://groups.google.com/d/msgid/rbase-l/CABX9BNeEX33VSjW-4L2G6nvget5PHrfteLpq0g8C1%3Dm%3DL%3DY7BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion visit 
https://groups.google.com/d/msgid/rbase-l/1111783164.1466617.1739915269303%40mail.yahoo.com
 
<https://groups.google.com/d/msgid/rbase-l/1111783164.1466617.1739915269303%40mail.yahoo.com?utm_medium=email&utm_source=footer>
 .

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/rbase-l/01bb01db825c%24d22517d0%24766f4770%24%40vtgonline.com.

Reply via email to