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

The Shares Amount is 152335000

The cusip is 12613R104
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '12613R104'
Number of Rows :38

update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '98.47' where entryId = '1115189'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.09' where entryId = '1264356'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '67.9' where entryId = '1569532'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '2.42' where entryId = '1701067'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.01' where entryId = '1827279'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.06' where entryId = '2207541'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '2448343'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '11.51' where entryId = '2827503'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '2.92' where entryId = '2831254'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '65.38' where entryId = '3504107'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '12.22' where entryId = '3727575'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '4415228'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '4417002'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '4436272'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.87' where entryId = '9340995'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '1.08' where entryId = '9753745'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '35.9' where entryId = '10229699'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.79' where entryId = '10833968'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.98' where entryId = '11054245'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.86' where entryId = '11054818'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.73' where entryId = '11076951'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '9.98' where entryId = '11451491'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '12032960'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '1.61' where entryId = '12286397'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '1.16' where entryId = '12908274'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.86' where entryId = '12910659'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '6.56' where entryId = '12956713'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '2.55' where entryId = '13007598'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.01' where entryId = '13022455'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '2.55' where entryId = '13830117'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.98' where entryId = '13975833'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '12.05' where entryId = '14326788'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.86' where entryId = '14628627'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0.01' where entryId = '14677621'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '14822049'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '1.48' where entryId = '14872529'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '16955098'
update current13Fpositions set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' , percentOut = '0' where entryId = '17226437'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '12613R104'
Number of Rows :2

update archive13F set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' where entryId = '3688206'
update archive13F set compid = '133114', sectorNum = '604001', sectorDes = 'Search Engines & Information', issuerCik = '0001015577' where entryId = '4402980'
End Function
The Script is complete, exiting....