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: : 132660
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '132660'
The Shares Amount is 102104000
The cusip is 40422Y101
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '40422Y101'
Number of Rows :69
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.85'
where entryId = '9679629'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '6.99'
where entryId = '9754961'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '569.84'
where entryId = '10236994'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '677.73'
where entryId = '11178882'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '11274044'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '5.88'
where entryId = '11387750'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '12179032'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '5.54'
where entryId = '12287279'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '12562049'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '4.18'
where entryId = '12934375'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.96'
where entryId = '12956849'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.07'
where entryId = '13023362'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.29'
where entryId = '13242703'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '13389842'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '644.55'
where entryId = '13443120'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '9.29'
where entryId = '13471278'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '13645102'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.96'
where entryId = '13975965'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.99'
where entryId = '14310045'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '625.88'
where entryId = '14319706'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '54.24'
where entryId = '14330626'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '54.21'
where entryId = '14332761'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.04'
where entryId = '14678508'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '14823837'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '103.16'
where entryId = '14874558'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '9.67'
where entryId = '15399750'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.08'
where entryId = '15503268'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.96'
where entryId = '15626826'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '15778402'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '577.49'
where entryId = '15971744'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '175.4'
where entryId = '16006097'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.04'
where entryId = '16194786'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '16285861'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.18'
where entryId = '16353038'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.18'
where entryId = '16354292'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '16633365'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '16955711'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '3.47'
where entryId = '16978603'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '561.44'
where entryId = '17009713'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '17013025'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '17074329'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '4.53'
where entryId = '17199592'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '3.92'
where entryId = '17275166'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.08'
where entryId = '17383498'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '199.66'
where entryId = '17432848'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '17482454'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '19.83'
where entryId = '17529642'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.18'
where entryId = '17727850'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '17787378'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.25'
where entryId = '17978422'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.18'
where entryId = '18493079'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '60.06'
where entryId = '18569219'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '190.88'
where entryId = '18622262'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.03'
where entryId = '18761481'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.18'
where entryId = '18836123'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '5.19'
where entryId = '18853906'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1.03'
where entryId = '19053577'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.17'
where entryId = '19148205'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '2.72'
where entryId = '19264066'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '5.47'
where entryId = '19615413'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0.7'
where entryId = '19880408'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '2.88'
where entryId = '19884622'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '205.06'
where entryId = '19940924'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '263.75'
where entryId = '21702945'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '2.1'
where entryId = '22639203'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '5.76'
where entryId = '23172127'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '24520743'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '0'
where entryId = '24928964'
update current13Fpositions set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575' ,
percentOut = '1492.65'
where entryId = '131924160'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '40422Y101'
Number of Rows :10
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '104371173'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '107658004'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '109431481'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '112198749'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '115372257'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '117944759'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '121007609'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '123601601'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '125954251'
update archive13F set
compid = '132660',
sectorNum = '602003',
sectorDes = 'Healthcare Information Services',
issuerCik = '0001009575'
where entryId = '128998887'
End Function
The Script is complete, exiting....