To do multible compids, use the following script:
php /var/www/html_j3sg/institutions/ChangeCompidOfAllInstitutionalAfewCompaniesAtATime.php
Please note that the script mentioned above (ChangeCompidOfAllInstitutionalAfewCompaniesAtATime) only updates the current13FFilingpositions table, no archived tables.

This script actual updates 13F current table as well as both archive13F tables.

We got coming in compid: : 145589
SELECT companies.* , sectors.level3des FROM companies, sectors WHERE companies.sector = sectors.level3num and compid = '145589'

The Shares Amount is 1849000000

The cusip is 061874103
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '061874103'
Number of Rows :3

update current13Fpositions set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' , percentOut = '0.03' where entryId = '9753485'
update current13Fpositions set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' , percentOut = '0' where entryId = '15577354'
update current13Fpositions set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' , percentOut = '0.24' where entryId = '130401778'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '061874103'
Number of Rows :31

update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '67501849'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '66624737'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '64867135'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '69863643'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '71154015'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '73309121'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '75044631'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '76972780'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '78835607'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '81170329'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '82232636'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '84848508'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '87179158'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '89272780'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '91144475'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '93276141'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '94893252'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '96891161'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '100267126'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '103197915'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '106359806'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '109899789'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '111761642'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '114200827'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '116185637'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '119493090'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '120308892'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '122315123'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '123232952'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '124883305'
update archive13F set compid = '145589', sectorNum = '301002', sectorDes = 'Foreign Regional Banks', issuerCik = '' where entryId = '127715776'
End Function
The Script is complete, exiting....