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: : 130538
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130538'
The Shares Amount is 68170000
The cusip is 813705100
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '813705100'
Number of Rows :50
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '1599552'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '9.29'
where entryId = '3733457'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.47'
where entryId = '3917657'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '4415151'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '7.16'
where entryId = '5218803'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '1.85'
where entryId = '5455607'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '1.61'
where entryId = '5738226'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.78'
where entryId = '9757050'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '49.48'
where entryId = '10248447'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '10756409'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '15.17'
where entryId = '11450131'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '12320209'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '12327421'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '125.67'
where entryId = '12447606'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '25.4'
where entryId = '12627141'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.22'
where entryId = '13468276'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '13678740'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '13818489'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '19.36'
where entryId = '13932392'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '13939493'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '271.63'
where entryId = '13999218'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '4.44'
where entryId = '14328370'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '9.15'
where entryId = '14333104'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '14458086'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '86.05'
where entryId = '14636982'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.22'
where entryId = '14661838'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '14826849'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.98'
where entryId = '14878057'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.02'
where entryId = '15259851'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '15262511'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '4.33'
where entryId = '15450530'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '15753359'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '124.67'
where entryId = '16069275'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.08'
where entryId = '16118035'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.13'
where entryId = '16173163'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '16615878'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '5.33'
where entryId = '16631634'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '16764904'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '5.05'
where entryId = '16835757'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '16955313'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.62'
where entryId = '17016353'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '17075078'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '8.8'
where entryId = '17109576'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '20.78'
where entryId = '17206132'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '23.11'
where entryId = '17210929'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '22.04'
where entryId = '17432885'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '124.67'
where entryId = '17492268'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.01'
where entryId = '17526340'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0.08'
where entryId = '17541310'
update current13Fpositions set
compid = '130538',
sectorNum = '601002',
sectorDes = 'Computer Peripherals',
issuerCik = '0001001916' ,
percentOut = '0'
where entryId = '17786536'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '813705100'
Number of Rows :0
End Function
The Script is complete, exiting....