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

The Shares Amount is 52559000

The cusip is 70322A101
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '70322A101'
Number of Rows :14

update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '9.63' where entryId = '1701290'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '0.07' where entryId = '1827952'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '24.32' where entryId = '2832801'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '6.66' where entryId = '3312070'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '12.43' where entryId = '3732367'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '0' where entryId = '7560846'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '43.21' where entryId = '8276598'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '36.01' where entryId = '8392133'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '0.97' where entryId = '9756487'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '47.57' where entryId = '10023533'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '23.74' where entryId = '10245356'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '0' where entryId = '12561492'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '0' where entryId = '13401875'
update current13Fpositions set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' , percentOut = '0' where entryId = '130460562'
End Function

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

update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '77781815'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '79946022'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '81762234'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '83867480'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '86103054'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '87804091'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '90135457'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '92205467'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '94254549'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '96029107'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '98418005'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '100990039'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '103550488'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '105765314'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '109068980'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '111856258'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '114287752'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '116761737'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '119646873'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '122410947'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '124955744'
update archive13F set compid = '130630', sectorNum = '105008', sectorDes = 'Grocery Stores', issuerCik = '0000095585' where entryId = '127816890'
End Function
The Script is complete, exiting....