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

The Shares Amount is 40374000

The cusip is 38122G107
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '38122G107'
Number of Rows :22

update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '6.64' where entryId = '2831862'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '3.72' where entryId = '3505032'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '15.41' where entryId = '3682613'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '6.28' where entryId = '3729462'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0.47' where entryId = '9754898'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '29.58' where entryId = '10236651'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '1.04' where entryId = '11077112'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '13.18' where entryId = '11451533'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '1.12' where entryId = '12170620'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0.17' where entryId = '12287233'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0.02' where entryId = '12423976'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0.02' where entryId = '12479661'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0' where entryId = '12562543'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '2.48' where entryId = '12956815'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0.44' where entryId = '12972424'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0.04' where entryId = '13023321'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '4.39' where entryId = '14662542'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0' where entryId = '14959316'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '0' where entryId = '15008478'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '9.16' where entryId = '16682843'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '9.16' where entryId = '16683161'
update current13Fpositions set compid = '131158', sectorNum = '605006', sectorDes = 'Telecom Services - Foreign', issuerCik = '0001089874' , percentOut = '9.16' where entryId = '16683481'
End Function

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

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