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

The Shares Amount is 14639000

The cusip is 374508109
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '374508109'
Number of Rows :15

update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '101.88' where entryId = '1569752'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '0' where entryId = '2307808'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '77.19' where entryId = '2831847'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '2.05' where entryId = '3031480'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '6.35' where entryId = '3505004'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '44.2' where entryId = '3682610'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '13.49' where entryId = '3729392'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '82.62' where entryId = '3916965'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '0' where entryId = '5099752'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '17.08' where entryId = '6059202'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '188.54' where entryId = '6793595'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '14.35' where entryId = '7429817'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '0' where entryId = '8499783'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '0' where entryId = '9826189'
update current13Fpositions set compid = '131996', sectorNum = '901006', sectorDes = 'Oil & Gas Refining, Processing & Marketing', issuerCik = '0000856465' , percentOut = '0' where entryId = '10526631'
End Function

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

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