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: : 130938
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130938'
The Shares Amount is 76085000
The cusip is 68750U102
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '68750U102'
Number of Rows :45
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0.78'
where entryId = '3732228'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '230.13'
where entryId = '4374362'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '168.23'
where entryId = '9342056'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '4.22'
where entryId = '10244805'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '197.75'
where entryId = '11066069'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '29.57'
where entryId = '11272421'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '708.37'
where entryId = '11818306'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '14.18'
where entryId = '12464521'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '529.75'
where entryId = '12540652'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '552.75'
where entryId = '13686251'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '8.62'
where entryId = '14363402'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '768.94'
where entryId = '14378788'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '214.9'
where entryId = '14648993'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0.81'
where entryId = '14876884'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '209.87'
where entryId = '15468237'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '556.04'
where entryId = '15504963'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '161.53'
where entryId = '16353392'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '161.53'
where entryId = '16354646'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '216.51'
where entryId = '16675942'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '36.01'
where entryId = '16693565'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '516.53'
where entryId = '16920785'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '16954974'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0.69'
where entryId = '17015993'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '12.35'
where entryId = '17100768'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '17105249'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '528.2'
where entryId = '17728196'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '17820954'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '38.38'
where entryId = '18054198'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '234.64'
where entryId = '18258747'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '160'
where entryId = '18290897'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '279.82'
where entryId = '18493350'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '407.27'
where entryId = '18495085'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '6.57'
where entryId = '18657732'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '18659066'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '6.57'
where entryId = '18723013'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '18765946'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '209.48'
where entryId = '19663782'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '19986054'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '176.66'
where entryId = '21351166'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '21538721'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0.07'
where entryId = '23175451'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '61.87'
where entryId = '23925593'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '0'
where entryId = '24521763'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '5.26'
where entryId = '29446601'
update current13Fpositions set
compid = '130938',
sectorNum = '402006',
sectorDes = 'Medical Instruments & Supplies',
issuerCik = '0000913756' ,
percentOut = '17.76'
where entryId = '29957027'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '68750U102'
Number of Rows :0
End Function
The Script is complete, exiting....