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

The Shares Amount is 38795000

The cusip is 76123U105
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '76123U105'
Number of Rows :8

update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '128.97' where entryId = '16110608'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '128.76' where entryId = '17533716'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '0' where entryId = '18765986'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '161.15' where entryId = '23457407'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '0' where entryId = '24522129'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '980.84' where entryId = '48476032'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '0.39' where entryId = '51215738'
update current13Fpositions set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' , percentOut = '597.98' where entryId = '51397520'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '76123U105'
Number of Rows :2

update archive13F set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' where entryId = '67175599'
update archive13F set compid = '151566', sectorNum = '401002', sectorDes = 'Diagnostic Substances', issuerCik = '0001124608' where entryId = '65486186'
End Function
The Script is complete, exiting....