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

The Shares Amount is 2170000

The cusip is 29014R202
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '29014R202'
Number of Rows :5

update current13Fpositions set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' , percentOut = '0.29' where entryId = '131909979'
update current13Fpositions set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' , percentOut = '0' where entryId = '132605219'
update current13Fpositions set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' , percentOut = '0' where entryId = '131377634'
update current13Fpositions set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' , percentOut = '0' where entryId = '131346458'
update current13Fpositions set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' , percentOut = '0' where entryId = '132626912'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '29014R202'
Number of Rows :97

update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '116384822'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117826087'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117170179'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '118089266'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117156916'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '116850015'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117441382'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '116883565'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117657737'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117407862'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '116770743'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '118236195'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117989448'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117586139'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '117035067'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '118101310'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '118216058'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '118080702'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119546326'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120177170'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121108248'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119423798'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119539618'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120175507'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121177188'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119832233'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121125453'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120041806'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120661843'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119900940'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120707394'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119655884'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '119679486'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120328674'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '120773912'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121185922'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121519795'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121053967'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122455028'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122664824'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121786378'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122248571'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122833683'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123256916'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122557563'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '121884972'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123766872'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122951398'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123289571'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123655060'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122888653'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123931477'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123367949'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122371006'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122843581'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '122165310'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123809596'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '123606971'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126230611'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '124944167'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126093850'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '124461547'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '125461601'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '125034828'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '124718289'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '125004276'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '125177345'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '125401103'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '125605298'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126012024'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126094130'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126117008'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126125021'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126174028'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126209547'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126273094'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126331731'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '126953745'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '128370577'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129673264'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129150159'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129676802'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '128373403'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129725397'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129848625'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129683416'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '127416193'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129739593'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129725630'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129712794'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129686782'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129729743'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129150192'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129723640'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '128382781'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '128133352'
update archive13F set compid = '130793', sectorNum = '401001', sectorDes = 'Biotechnology', issuerCik = '0001035354' where entryId = '129721489'
End Function
The Script is complete, exiting....