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

The Shares Amount is 9000000

The cusip is 06740P874
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '06740P874'
Number of Rows :1

update current13Fpositions set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' , percentOut = '0.5' where entryId = '51208120'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '06740P874'
Number of Rows :15

update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '66035276'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '68141098'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '67855223'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '67700027'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '66364222'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '64267772'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '64649070'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '69652715'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '69611469'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '70896928'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '71187438'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '73144473'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '73748075'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '74866545'
update archive13F set compid = '159704', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '9000004170' where entryId = '77624582'
End Function
The Script is complete, exiting....