Author |
Topic  |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 17 November 2007 : 18:13:04
|
Hi,
I need to change the following fields within the FORUM_MEMBERS table.
- M_SMS - M_PHONE
At present all numbers begin with '0' I need to change this to '+44' to make them all international, they are all uk numbers luckily.
So basically 08701355431 need to become +448701355431
Can someone please show me the dbs code I would need to run to update the table. |
Phil |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 November 2007 : 07:27:26
|
Also if it helps
M_SMS is nvar, 20 M_PHONE is char, 50
Should they be the same type after all they contain the same data.
If so what files need updating so the profiles files will update in future. |
Phil |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 20 November 2007 : 15:05:21
|
dammit, I was spelling this out for you in T-SQL, sorry my PL/SQL (?) is lousy
What you do need though is an UPDATE statement similar to...
UPDATE FORUM_MEMBERS SET M_SMS = "+44" & right(M_SMS, 10), M_PHONE = "+44" & right(M_PHONE, 10) ;
Now in all seriousness, test the backside off this before doing it - in fact make a copy of the table or add a couple of fields called INTL_M_SMS and INTL_M_PHONE or something, and tweak the code to
UPDATE FORUM_MEMBERS SET INTL_M_SMS = "+44" & right(M_SMS, 10), INTL_M_PHONE = "+44" & right(M_PHONE, 10) ;
first. Oh, and I've no idea what the MySQL string handling is like, so it's probably not 'right' and '&', so look these up! |
 |
|
|
Topic  |
|
|
|