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

The Shares Amount is 11078000

The cusip is 147195101
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '147195101'
Number of Rows :69

update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '34.58' where entryId = '2831103'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '14.89' where entryId = '3727164'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.36' where entryId = '3916579'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '4415077'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.63' where entryId = '5086661'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '31.41' where entryId = '7429550'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '23.05' where entryId = '9341045'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '22.22' where entryId = '9753852'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '60.11' where entryId = '10230273'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '16.74' where entryId = '10453375'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '79.58' where entryId = '11449194'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '12192498'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.33' where entryId = '12286474'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '12327070'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '1.62' where entryId = '12986850'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.4' where entryId = '13467572'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '13671642'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '13678384'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '28.39' where entryId = '13932208'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '31.64' where entryId = '14326675'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '14455494'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.4' where entryId = '14660901'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '14822187'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.07' where entryId = '14872698'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '15132600'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '137.17' where entryId = '15136945'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '15262148'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '3.95' where entryId = '15449409'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '39.75' where entryId = '16008274'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.15' where entryId = '16117102'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '41.36' where entryId = '16551948'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '16615512'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '3.86' where entryId = '16834665'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.65' where entryId = '17014632'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '39.7' where entryId = '17029160'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.09' where entryId = '17051447'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '17073902'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '84.59' where entryId = '17196301'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '17532913'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.15' where entryId = '17540356'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '17787031'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '5.37' where entryId = '17989466'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '18057521'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '41.32' where entryId = '18075655'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '4.02' where entryId = '18297752'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '39.42' where entryId = '18377395'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '18657946'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0.21' where entryId = '19115311'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '39.31' where entryId = '20103476'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '3.53' where entryId = '23168906'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '24519612'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '28779078'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '3.55' where entryId = '31798902'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '5.58' where entryId = '32907521'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '13.34' where entryId = '33103100'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '34254568'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '392.95' where entryId = '35848136'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '40896856'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '3.81' where entryId = '41650692'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '45.36' where entryId = '42061870'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42265865'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42266998'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42267241'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42268501'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42269333'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42469763'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42470165'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '42470378'
update current13Fpositions set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' , percentOut = '0' where entryId = '44590371'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '147195101'
Number of Rows :6

update archive13F set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' where entryId = '63754328'
update archive13F set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' where entryId = '105275289'
update archive13F set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' where entryId = '107801159'
update archive13F set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' where entryId = '110519889'
update archive13F set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' where entryId = '113247163'
update archive13F set compid = '133577', sectorNum = '504002', sectorDes = 'Farm & Construction Machinery', issuerCik = '0000018061' where entryId = '116021147'
End Function
The Script is complete, exiting....