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: : 130753
SELECT companies.* , sectors.level3des FROM companies, sectors WHERE companies.sector = sectors.level3num and compid = '130753'

The Shares Amount is 137900000

The cusip is 638612101
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '638612101'
Number of Rows :87

update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.62' where entryId = '1265087'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '23.14' where entryId = '1570035'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '3.28' where entryId = '1701269'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '1827867'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.02' where entryId = '1983731'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '8.44' where entryId = '2832610'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '22.89' where entryId = '3031641'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.61' where entryId = '3506136'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '3685541'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '25.57' where entryId = '3731730'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '10.99' where entryId = '3917351'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '5.57' where entryId = '4113228'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.38' where entryId = '5482910'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '47.92' where entryId = '7530068'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '7845862'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.22' where entryId = '9158049'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.35' where entryId = '9341964'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.08' where entryId = '9756119'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '16.78' where entryId = '10243499'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '3.42' where entryId = '10595647'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.41' where entryId = '11077352'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.1' where entryId = '11103391'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '40.37' where entryId = '11265870'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.28' where entryId = '11289439'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '7.02' where entryId = '11451574'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.21' where entryId = '12188215'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '12191948'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.04' where entryId = '12196294'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.26' where entryId = '12230646'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '2.19' where entryId = '12627569'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '12790889'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.11' where entryId = '12846901'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '12934656'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.11' where entryId = '12972460'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.3' where entryId = '13024281'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.49' where entryId = '13242907'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '13669525'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '13818197'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '13938915'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '14266476'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.42' where entryId = '14310278'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '5.08' where entryId = '14330671'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '7.25' where entryId = '14389302'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '14575665'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '2.34' where entryId = '14662578'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.68' where entryId = '14679401'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '4.72' where entryId = '14876445'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.59' where entryId = '14952065'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.2' where entryId = '15098896'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '15259276'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '15473650'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '72.52' where entryId = '15580569'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.33' where entryId = '15593973'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '15618935'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '15983590'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '3.76' where entryId = '16006136'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '16110902'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.66' where entryId = '16195750'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.35' where entryId = '16353318'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.35' where entryId = '16354572'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.81' where entryId = '16362599'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '16764271'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '16874112'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.33' where entryId = '16963608'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '17013129'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '17074742'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '17108040'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '3.68' where entryId = '17202999'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '17227028'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '3.88' where entryId = '17432862'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.09' where entryId = '17557973'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '17673994'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.74' where entryId = '17979388'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '18182223'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '18261325'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '18332624'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '18551566'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.01' where entryId = '18660614'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '1.81' where entryId = '18818472'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '19063436'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.33' where entryId = '19064853'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0.56' where entryId = '19149138'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '19238481'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '20920155'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '20937703'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '28978262'
update current13Fpositions set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' , percentOut = '0' where entryId = '130460290'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '638612101'
Number of Rows :22

update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '77781605'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '79945815'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '81762053'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '83867278'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '86102858'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '87803885'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '90135256'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '92205261'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '94254339'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '96028898'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '98417795'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '100989827'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '103550272'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '105765072'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '109068737'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '111856007'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '114287499'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '116761493'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '119646623'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '122410683'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '124955478'
update archive13F set compid = '130753', sectorNum = '303003', sectorDes = 'Life & Health Insurance', issuerCik = '0001029786' where entryId = '127816624'
End Function
The Script is complete, exiting....