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

The Shares Amount is 129678000

The cusip is 745310102
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '745310102'
Number of Rows :112

update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.57' where entryId = '1224456'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '1367177'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '39.9' where entryId = '1570179'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.02' where entryId = '1828034'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.74' where entryId = '2828088'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.08' where entryId = '2832978'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '2.5' where entryId = '3506655'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '9.54' where entryId = '3732874'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '4077301'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.87' where entryId = '6910888'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.05' where entryId = '8273504'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '7.01' where entryId = '9158115'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.71' where entryId = '9342194'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '4.68' where entryId = '9756720'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '114.83' where entryId = '10246638'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '8.95' where entryId = '10595656'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.64' where entryId = '10719921'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '502.08' where entryId = '11103539'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '18.45' where entryId = '11112489'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '2.89' where entryId = '11450045'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.12' where entryId = '12320049'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '12326366'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '12424369'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.75' where entryId = '12442327'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '12555079'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.64' where entryId = '12709420'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.83' where entryId = '12732625'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '12790931'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '5.5' where entryId = '12934824'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.32' where entryId = '13024775'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.8' where entryId = '13244116'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.62' where entryId = '13468203'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '13677679'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '13818376'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '13875689'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.11' where entryId = '13939298'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.75' where entryId = '13997835'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '238.2' where entryId = '14052682'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.69' where entryId = '14149376'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.62' where entryId = '14157297'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '18.55' where entryId = '14328216'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '17.1' where entryId = '14330688'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '14552974'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.7' where entryId = '14661748'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.06' where entryId = '14679903'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.8' where entryId = '14870517'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '175.03' where entryId = '14877478'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '3.54' where entryId = '14952161'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.83' where entryId = '15109324'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.83' where entryId = '15165820'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.11' where entryId = '15259683'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '15261449'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '9.21' where entryId = '15301192'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '15337262'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.31' where entryId = '15450416'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.56' where entryId = '15473954'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.75' where entryId = '15525508'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '5.24' where entryId = '15627585'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.8' where entryId = '15891223'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '15983631'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.7' where entryId = '16117947'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.02' where entryId = '16173129'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.07' where entryId = '16196267'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '4.24' where entryId = '16362626'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.83' where entryId = '16554019'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '16614805'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '16709357'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '8.83' where entryId = '16716087'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.11' where entryId = '16764696'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.75' where entryId = '16834015'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.3' where entryId = '16835639'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '16920405'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.03' where entryId = '16939178'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.96' where entryId = '16978700'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '17013171'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.47' where entryId = '17016176'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '17074951'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '17104722'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '2.82' where entryId = '17130525'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '61.14' where entryId = '17205042'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.8' where entryId = '17367906'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '3.08' where entryId = '17502048'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '3.08' where entryId = '17504399'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '3.14' where entryId = '17529652'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.7' where entryId = '17541223'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '17547317'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.06' where entryId = '17558111'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '17786600'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.07' where entryId = '17979920'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.76' where entryId = '18116225'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.83' where entryId = '18130640'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '2.94' where entryId = '18159184'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.11' where entryId = '18182617'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '18294009'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.29' where entryId = '18298754'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.75' where entryId = '18375502'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '18386659'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '8.83' where entryId = '18548659'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '18551756'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.82' where entryId = '18626524'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '18658559'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.34' where entryId = '18761622'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.16' where entryId = '18818479'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '1.68' where entryId = '18834458'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.76' where entryId = '18944646'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '19054543'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.3' where entryId = '19116163'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.45' where entryId = '19117397'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0.52' where entryId = '19149672'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '20747829'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '20937759'
update current13Fpositions set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' , percentOut = '0' where entryId = '28978286'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '745310102'
Number of Rows :1

update archive13F set compid = '130844', sectorNum = '1001001', sectorDes = 'Electric Utilities', issuerCik = '0001085392' where entryId = '65629301'
End Function
The Script is complete, exiting....