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

The Shares Amount is 100500000

The cusip is G0229R108
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = 'G0229R108'
Number of Rows :31

update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '9.95' where entryId = '28296786'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '31253561'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '134.02' where entryId = '31774001'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0.91' where entryId = '31891482'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '32575050'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '34744982'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '1.73' where entryId = '38324623'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '40897050'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '4' where entryId = '41650390'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '2.46' where entryId = '41673902'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42265889'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42266194'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42267280'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42268511'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42269174'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42456492'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42458436'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42460591'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42460689'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42461839'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42463770'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42467197'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42467777'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42468559'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42469140'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42469709'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42469768'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42470196'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42470321'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42470400'
update current13Fpositions set compid = '130906', sectorNum = '303004', sectorDes = 'Property & Casualty Insurance', issuerCik = '0001141719' , percentOut = '0' where entryId = '42685500'
End Function

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

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