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: : 132490
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '132490'
The Shares Amount is 21781000
The cusip is 296744105
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '296744105'
Number of Rows :13
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '7.88'
where entryId = '2831631'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '122.25'
where entryId = '3127836'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '0'
where entryId = '3685792'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '12.9'
where entryId = '3728742'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '0.23'
where entryId = '3916853'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '0'
where entryId = '6254159'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '6.15'
where entryId = '6416219'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '133.07'
where entryId = '6793584'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '45.26'
where entryId = '9157914'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '11.94'
where entryId = '19987916'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '13.77'
where entryId = '20128409'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '18.36'
where entryId = '20128535'
update current13Fpositions set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199' ,
percentOut = '19.83'
where entryId = '20128650'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '296744105'
Number of Rows :1
update archive13F set
compid = '132490',
sectorNum = '602008',
sectorDes = 'Technical & System Software',
issuerCik = '0000355199'
where entryId = '970023'
End Function
The Script is complete, exiting....