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

The Shares Amount is 77660000

The cusip is 82705T102
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '82705T102'
Number of Rows :85

update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.22' where entryId = '1265417'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.01' where entryId = '1828144'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '13.23' where entryId = '3733559'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '126' where entryId = '4374406'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '15.47' where entryId = '7300524'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '8169456'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '20.89' where entryId = '9625617'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.22' where entryId = '9757103'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '70.03' where entryId = '10248725'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '23.82' where entryId = '10984496'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '134.95' where entryId = '11112501'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.01' where entryId = '11251220'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '210.21' where entryId = '11818330'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '2.16' where entryId = '12288737'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.01' where entryId = '12446653'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '193.09' where entryId = '12540677'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '12562061'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.81' where entryId = '12850252'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '12.35' where entryId = '13618477'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '135.14' where entryId = '13686275'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.81' where entryId = '13784505'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '35.59' where entryId = '14328398'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '7.12' where entryId = '14878130'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '15263395'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '6.7' where entryId = '15303348'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.81' where entryId = '15455411'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '135.14' where entryId = '15504985'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '16616817'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.81' where entryId = '16709073'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '2.91' where entryId = '16908734'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '99.78' where entryId = '16920807'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.3' where entryId = '16939349'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.74' where entryId = '17016380'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '17075096'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '36.46' where entryId = '17135340'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '28.08' where entryId = '17206264'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.33' where entryId = '17468710'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.01' where entryId = '17542321'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '17786511'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.28' where entryId = '18067501'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.8' where entryId = '18385756'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.92' where entryId = '19116954'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.4' where entryId = '20168982'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '20919901'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '18.68' where entryId = '22449667'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.16' where entryId = '22865519'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.04' where entryId = '23177317'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '96.57' where entryId = '23245413'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '24505447'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '24522337'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '24927610'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '7.73' where entryId = '29678159'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '29689235'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '32.23' where entryId = '31800154'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '32529661'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '97.09' where entryId = '35849194'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.38' where entryId = '36944062'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0' where entryId = '37905426'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '3.2' where entryId = '38780281'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '58.33' where entryId = '39908492'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '7.91' where entryId = '40850755'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '5.18' where entryId = '41652197'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '4.02' where entryId = '41675402'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '6.92' where entryId = '42075734'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '2.74' where entryId = '42078429'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '14.62' where entryId = '42086323'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '17.32' where entryId = '42107210'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '4.51' where entryId = '42143529'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '6.46' where entryId = '42146874'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '55.1' where entryId = '42172409'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '22.53' where entryId = '42173678'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '52.53' where entryId = '42175091'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '5.11' where entryId = '42177308'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '32.19' where entryId = '42186843'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.39' where entryId = '42202778'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '8.45' where entryId = '42225807'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.78' where entryId = '42248363'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.56' where entryId = '42499038'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '0.71' where entryId = '43979411'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '25.75' where entryId = '48062371'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.49' where entryId = '50067593'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.95' where entryId = '50359099'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '1.42' where entryId = '51216284'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '99.82' where entryId = '51397529'
update current13Fpositions set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' , percentOut = '106.46' where entryId = '51751710'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '82705T102'
Number of Rows :2

update archive13F set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' where entryId = '45258236'
update archive13F set compid = '130553', sectorNum = '603006', sectorDes = 'Semiconductor - MemoryChips', issuerCik = '0001003214' where entryId = '103287273'
End Function
The Script is complete, exiting....