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

The Shares Amount is 107316000

The cusip is 862111200
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '862111200'
Number of Rows :2

update current13Fpositions set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' , percentOut = '3.73' where entryId = '19987726'
update current13Fpositions set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' , percentOut = '0' where entryId = '130461190'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '862111200'
Number of Rows :22

update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '77782309'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '79946518'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '81762129'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '83867970'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '86103537'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '87804581'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '90135933'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '92205941'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '94255027'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '96029587'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '98418490'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '100990537'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '103550989'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '105765876'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '109069553'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '111856830'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '114288324'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '116762313'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '119647461'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '122411575'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '124956365'
update archive13F set compid = '133599', sectorNum = '601003', sectorDes = 'Data Storage Devices', issuerCik = '0000094673' where entryId = '127817508'
End Function
The Script is complete, exiting....