05-21-2014, 09:06 AM
Yes, there is an error in the update:
instead of
Now you are going to have to play around with the substring/lpad to get it right (sorry)
I guess it will be something down the line
that will fix the first 9, then you need another one for the next 90
PLEASE test the assignment before launching
Code:
substr(`account_no`,0,3)
instead of
Code:
substr(`account_no`,1,3)
Now you are going to have to play around with the substring/lpad to get it right (sorry)
I guess it will be something down the line
Code:
UPDATE `vtiger_account` SET `account_no`= concat('ORG',lpad(substr(`account_no`,4),5,'0')) where substr(`account_no`,1,4)=='000G';
that will fix the first 9, then you need another one for the next 90
Code:
UPDATE `vtiger_account` SET `account_no`= concat('ORG',lpad(substr(`account_no`,3),5,'0')) where substr(`account_no`,1,3)=='00G';
PLEASE test the assignment before launching
Joe
TSolucio
TSolucio