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: : 130854
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130854'
The Shares Amount is 36070000
The cusip is 82661W107
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '82661W107'
Number of Rows :15
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '17.62'
where entryId = '1129390'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '0.55'
where entryId = '1265416'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '55.16'
where entryId = '1276987'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '0.02'
where entryId = '1828141'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '12.48'
where entryId = '3506964'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '13.06'
where entryId = '3733549'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '0'
where entryId = '4077311'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '27.72'
where entryId = '5682122'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '3.22'
where entryId = '6416688'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '35.33'
where entryId = '7530262'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '325.01'
where entryId = '9896641'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '18.62'
where entryId = '10248695'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '0.39'
where entryId = '12288732'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '260.86'
where entryId = '14330755'
update current13Fpositions set
compid = '130854',
sectorNum = '603004',
sectorDes = 'Semiconductor- BroadLine',
issuerCik = '0001043639' ,
percentOut = '22.58'
where entryId = '14878123'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '82661W107'
Number of Rows :0
End Function
The Script is complete, exiting....