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

The Shares Amount is 9215000

The cusip is 030710107
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '030710107'
Number of Rows :56

update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '34.36' where entryId = '1569341'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.96' where entryId = '2830734'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '12.15' where entryId = '3726039'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.33' where entryId = '5086602'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.93' where entryId = '9753244'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '37.44' where entryId = '10222683'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '497.22' where entryId = '10226818'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '10874159'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '14.97' where entryId = '10984462'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '11115490'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.87' where entryId = '12317791'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '2.6' where entryId = '12448832'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '3.18' where entryId = '12986747'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '13817148'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '2.6' where entryId = '13928461'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.87' where entryId = '13937087'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '9.98' where entryId = '14106387'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '15.63' where entryId = '14326379'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '8.1' where entryId = '14332404'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '14821270'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '11.87' where entryId = '14871740'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.32' where entryId = '15070991'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.32' where entryId = '15084954'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '2.6' where entryId = '15198843'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '15237976'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.87' where entryId = '15257425'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '3.69' where entryId = '15447423'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.32' where entryId = '15449209'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '1.24' where entryId = '16582967'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.87' where entryId = '16762344'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.97' where entryId = '16834452'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '2.6' where entryId = '16848585'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '9.55' where entryId = '16865891'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.11' where entryId = '16937815'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.83' where entryId = '16978468'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '9.12' where entryId = '17009466'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.79' where entryId = '17014309'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '17073684'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.21' where entryId = '17107274'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '14.71' where entryId = '17194477'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '17670280'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '17786836'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '2.6' where entryId = '18154135'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '18541356'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.22' where entryId = '18659915'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '16.39' where entryId = '18805436'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '10.85' where entryId = '18842013'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.01' where entryId = '19146875'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '19633353'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '5.7' where entryId = '23167463'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0.54' where entryId = '24137986'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '24519138'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '24928141'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '3.55' where entryId = '30181059'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '42.86' where entryId = '30777729'
update current13Fpositions set compid = '132044', sectorNum = '702002', sectorDes = 'General Building Materials', issuerCik = '0000790730' , percentOut = '0' where entryId = '32248964'
End Function

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

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