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

The Shares Amount is 61284000

The cusip is 23767P109
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '23767P109'
Number of Rows :42

update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '261.29' where entryId = '11324751'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0.1' where entryId = '12286791'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '537.64' where entryId = '12459216'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '1.25' where entryId = '12808539'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '8.88' where entryId = '13937730'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '548.93' where entryId = '14352340'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '14454605'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '14552445'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0.33' where entryId = '14873399'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '15258069'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '15336741'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '564.46' where entryId = '15457457'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '4.5' where entryId = '15478601'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '2.45' where entryId = '15626725'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '6.47' where entryId = '15773995'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '1.83' where entryId = '15997990'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0.01' where entryId = '16194249'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '97.9' where entryId = '16362500'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '16763008'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '16919878'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0.43' where entryId = '17014863'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '4.33' where entryId = '17044157'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '445.98' where entryId = '17092270'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '2.91' where entryId = '17274818'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '32.63' where entryId = '17536925'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '62.79' where entryId = '18149510'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '104.1' where entryId = '18170781'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '75.07' where entryId = '18253041'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '18273469'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '18293499'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0.11' where entryId = '18312337'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '18355380'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '5.45' where entryId = '18382486'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '310.92' where entryId = '18388785'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '18658909'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '63.64' where entryId = '18659376'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '2.45' where entryId = '18664525'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '7.24' where entryId = '20791489'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '10.02' where entryId = '21207584'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0.16' where entryId = '21274383'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '22865624'
update current13Fpositions set compid = '151598', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0001391984' , percentOut = '0' where entryId = '23406686'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '23767P109'
Number of Rows :0

End Function
The Script is complete, exiting....