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

The Shares Amount is 11506000

The cusip is 176682102
NOT OLD

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

update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '2.11' where entryId = '3727513'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '21.73' where entryId = '7429595'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '9.31' where entryId = '10231242'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '0.31' where entryId = '11068126'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '24.38' where entryId = '12852899'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '0.04' where entryId = '14266291'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '24.38' where entryId = '16031003'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '0.03' where entryId = '16110746'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '0.03' where entryId = '16873942'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '22.21' where entryId = '17966404'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '22.21' where entryId = '17994775'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '0' where entryId = '24519763'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '156.44' where entryId = '32602216'
update current13Fpositions set compid = '130915', sectorNum = '301010', sectorDes = 'Savings & Loans', issuerCik = '0001051871' , percentOut = '0' where entryId = '40599383'
End Function

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

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