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

The Shares Amount is 370993000

The cusip is 013104104
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '013104104'
Number of Rows :19

update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0.38' where entryId = '1141324'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '2.09' where entryId = '1223356'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '1.15' where entryId = '1264047'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0.75' where entryId = '1299304'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0.51' where entryId = '1375155'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '1599344'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '1827003'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0.03' where entryId = '1983295'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '3.45' where entryId = '2374203'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '14.19' where entryId = '2608118'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '2.03' where entryId = '2830621'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '1.71' where entryId = '2882955'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0.44' where entryId = '3031242'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '3.05' where entryId = '3503115'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '3746751'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '4077255'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '4428227'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '4436128'
update current13Fpositions set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' , percentOut = '0' where entryId = '130457947'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '013104104'
Number of Rows :45

update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '66816351'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '65009384'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '63397979'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '68420648'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '70087324'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '72166913'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '74293816'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '76204109'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '78474793'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '77779711'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '79943945'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '80256719'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '81762739'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '82110825'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '84496147'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '83865443'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '86101054'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '86213227'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '88425622'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '87802050'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '90072539'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '90133462'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '92203493'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '92310132'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '94252555'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '94645817'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '96027105'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '96485198'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '98415985'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '99011059'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '100988014'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '101093929'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '103548411'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '104535801'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '105762990'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '106240834'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '109066627'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '111853870'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '111786249'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '114285360'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '116759358'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '119644431'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '122408412'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '124953194'
update archive13F set compid = '132679', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000003333' where entryId = '127814329'
End Function
The Script is complete, exiting....