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: : 130646
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130646'
The Shares Amount is 14900000
The cusip is 219141108
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '219141108'
Number of Rows :35
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '11.64'
where entryId = '2831363'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '689.4'
where entryId = '3727876'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '310.6'
where entryId = '6793570'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '24.83'
where entryId = '7429628'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '116.69'
where entryId = '7529676'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.6'
where entryId = '9754147'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '24.6'
where entryId = '10232215'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '36.35'
where entryId = '12318375'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.02'
where entryId = '12423804'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '135.38'
where entryId = '12895647'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0'
where entryId = '13389856'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '129.18'
where entryId = '14355466'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.01'
where entryId = '14552418'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0'
where entryId = '14822695'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '2.31'
where entryId = '14873215'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.02'
where entryId = '15336714'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '115.11'
where entryId = '16049995'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.02'
where entryId = '16919853'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.47'
where entryId = '16938174'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '32.28'
where entryId = '16982639'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.59'
where entryId = '17014805'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '66.83'
where entryId = '17097642'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0'
where entryId = '17787128'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '24.66'
where entryId = '18177139'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0.01'
where entryId = '18293477'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '67.31'
where entryId = '18812325'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '29.53'
where entryId = '19263882'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '213.06'
where entryId = '20167860'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '386.08'
where entryId = '21207582'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '2.48'
where entryId = '23169760'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '41.04'
where entryId = '23456654'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '96.48'
where entryId = '23467901'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '22.38'
where entryId = '23595345'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0'
where entryId = '23652432'
update current13Fpositions set
compid = '130646',
sectorNum = '503008',
sectorDes = 'Security & Protection Services',
issuerCik = '0001016152' ,
percentOut = '0'
where entryId = '24519910'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '219141108'
Number of Rows :0
End Function
The Script is complete, exiting....