Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Record Numbering
#9
joebordes Wrote:Yes, there is an error in the update:

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

I guess I will have to delete and re-import the whole database. There are 1650 records and those queries did not work either. Thank you anyways.
Reply


Messages In This Thread
Record Numbering - polanskiman - 05-20-2014, 10:13 AM
Re: Record Numbering - joebordes - 05-20-2014, 02:14 PM
Re: Record Numbering - polanskiman - 05-21-2014, 04:13 AM
Re: Record Numbering - Ekim - 05-21-2014, 06:11 AM
Re: Record Numbering - polanskiman - 05-21-2014, 07:06 AM
Re: Record Numbering - joebordes - 05-21-2014, 08:41 AM
Re: Record Numbering - polanskiman - 05-21-2014, 08:49 AM
Re: Record Numbering - joebordes - 05-21-2014, 09:06 AM
Re: Record Numbering - polanskiman - 05-21-2014, 09:10 AM
Re: Record Numbering - joebordes - 05-21-2014, 09:21 AM
Re: Record Numbering - polanskiman - 05-21-2014, 09:34 AM
Re: Record Numbering - joebordes - 05-21-2014, 09:40 AM
Re: Record Numbering - polanskiman - 05-21-2014, 09:51 AM
Re: Record Numbering - polanskiman - 05-26-2014, 06:25 AM
Re: Record Numbering - joebordes - 05-26-2014, 08:42 AM
Re: Record Numbering - polanskiman - 05-26-2014, 09:20 AM
Re: Record Numbering - joebordes - 05-26-2014, 09:45 AM
Re: Record Numbering - polanskiman - 05-26-2014, 09:52 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)