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: : 130543
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130543'
The Shares Amount is 29710000
The cusip is 7171EP101
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '7171EP101'
Number of Rows :15
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '0.08'
where entryId = '1827981'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '0.24'
where entryId = '3732533'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '6.83'
where entryId = '10245827'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '210.37'
where entryId = '11272423'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '0'
where entryId = '13755785'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '1.58'
where entryId = '14877148'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '0'
where entryId = '15231053'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '17.13'
where entryId = '16645366'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '0'
where entryId = '16795356'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '0'
where entryId = '16955383'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '8.4'
where entryId = '17277960'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '67.32'
where entryId = '17432870'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '16.73'
where entryId = '17452839'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '6.6'
where entryId = '17527281'
update current13Fpositions set
compid = '130543',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001273013' ,
percentOut = '90.93'
where entryId = '18626520'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '7171EP101'
Number of Rows :0
End Function
The Script is complete, exiting....