Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 2:46 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: mysql Question
PostPosted: Sat Jun 02, 2007 12:07 am 
Offline

Joined: Mon May 29, 2006 10:38 am
Posts: 50
Not sure if this is the best place to ask this. I have some prefix that starts with a "1".

I need to know how to write an sql statement to remove the "1" from every prefix that starts with "1"

Example, New york dial prefix "1212", I need to update it to just be "212"


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 02, 2007 1:44 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Where will your prefix be? In which table? In what field?

Let's assume that the table is cc_ratecard and that the prefix field is dialprefix.

The query will be:

Code:
UPDATE cc_ratecard
SET dialprefix = MID(dialprefix, 2)
WHERE LEFT(dialprefix, 1) = 1


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 02, 2007 12:36 pm 
Offline

Joined: Mon May 29, 2006 10:38 am
Posts: 50
Asibi:

Your assumptions were correct. Thanks for the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group