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

The Shares Amount is 29333000

The cusip is 876851106
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '876851106'
Number of Rows :41

update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '18.22' where entryId = '1570326'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '8.42' where entryId = '2828214'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '2.3' where entryId = '2833393'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '3685857'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0.55' where entryId = '3734184'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '39.21' where entryId = '3918841'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '10.71' where entryId = '7430402'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '1.66' where entryId = '9757408'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '9987151'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '9.35' where entryId = '10250377'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '12260660'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0.01' where entryId = '12424508'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '13679642'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '13756101'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '8.11' where entryId = '14328560'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0.01' where entryId = '14553107'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '14827282'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '1.44' where entryId = '14878596'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '15265414'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '16646452'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '17226317'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '4.57' where entryId = '17728414'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '18124609'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '3.55' where entryId = '18493544'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '24522596'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '32249441'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '34255223'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '1.19' where entryId = '40850330'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '6.09' where entryId = '42095317'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '4.23' where entryId = '42102535'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '10.26' where entryId = '42107381'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0.03' where entryId = '42117978'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '8.57' where entryId = '42136449'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '3.78' where entryId = '42147023'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '2.73' where entryId = '42222365'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '4.1' where entryId = '42225968'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '11.89' where entryId = '42241313'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '42461108'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '42466622'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '42469825'
update current13Fpositions set compid = '130731', sectorNum = '301009', sectorDes = 'Domestic Regional Banks', issuerCik = '0001025536' , percentOut = '0' where entryId = '51354518'
End Function

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

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