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: : 130709
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130709'
The Shares Amount is 102770000
The cusip is 45782B302
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '45782B302'
Number of Rows :36
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '42.72'
where entryId = '131077728'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '130685120'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '2.38'
where entryId = '131998375'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.14'
where entryId = '130798341'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '1.19'
where entryId = '131401522'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '1.38'
where entryId = '130465104'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '131656682'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '2.09'
where entryId = '131573196'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.11'
where entryId = '132241823'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '4.47'
where entryId = '131245765'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '2.04'
where entryId = '130046858'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '130354696'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.01'
where entryId = '130676455'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '2.32'
where entryId = '132118590'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '132382543'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.43'
where entryId = '130113151'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.02'
where entryId = '130762515'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.22'
where entryId = '131977109'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '131271164'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.23'
where entryId = '131416391'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '2.41'
where entryId = '132128496'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '74.1'
where entryId = '130237556'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.49'
where entryId = '130565886'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.03'
where entryId = '130473008'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '130420218'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '8.15'
where entryId = '132107241'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.2'
where entryId = '130859483'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '10.6'
where entryId = '131026058'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '2.79'
where entryId = '131872136'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '130274739'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '129945825'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '3.02'
where entryId = '131410109'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.07'
where entryId = '131711859'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.05'
where entryId = '131088806'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0'
where entryId = '132393466'
update current13Fpositions set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652' ,
percentOut = '0.02'
where entryId = '132484320'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '45782B302'
Number of Rows :1
update archive13F set
compid = '130709',
sectorNum = '601005',
sectorDes = 'Networking & Communication Devices',
issuerCik = '0001022652'
where entryId = '128458210'
End Function
The Script is complete, exiting....