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: : 135355
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '135355'
The Shares Amount is 29939000
The cusip is 60886R103
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '60886R103'
Number of Rows :43
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '12.43'
where entryId = '3731526'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '5580235'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '65.17'
where entryId = '5747370'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '16.7'
where entryId = '7430089'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '287.24'
where entryId = '7530045'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '7.66'
where entryId = '9341921'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '3.89'
where entryId = '9756016'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '61.61'
where entryId = '10242900'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '145.02'
where entryId = '11112465'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '103.84'
where entryId = '11265803'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '1289.93'
where entryId = '11449847'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '12327307'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '108.79'
where entryId = '12846828'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0.33'
where entryId = '13024202'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '139.32'
where entryId = '13151075'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '2.93'
where entryId = '13468734'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '13678618'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '124.19'
where entryId = '14231696'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '5.82'
where entryId = '14327850'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '3.34'
where entryId = '14601270'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '2.93'
where entryId = '14661546'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0.33'
where entryId = '14679324'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '14825459'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0.08'
where entryId = '14876265'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '80.61'
where entryId = '15212701'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '15262389'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '5.09'
where entryId = '15450176'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '3.34'
where entryId = '16028010'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '1.09'
where entryId = '16117743'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0.33'
where entryId = '16195673'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '16615755'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '5.02'
where entryId = '16835401'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '1.48'
where entryId = '16938887'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0'
where entryId = '17226332'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '3.34'
where entryId = '17447121'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '1.09'
where entryId = '17541013'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0.33'
where entryId = '17979312'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '5.26'
where entryId = '18298511'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '3.34'
where entryId = '19065134'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '7.59'
where entryId = '19115957'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '0.33'
where entryId = '19149055'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '18.37'
where entryId = '27752198'
update current13Fpositions set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619' ,
percentOut = '1.39'
where entryId = '130408469'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '60886R103'
Number of Rows :7
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '66682651'
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '66656236'
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '63527714'
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '64869029'
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '68912546'
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '124893752'
update archive13F set
compid = '135355',
sectorNum = '101004',
sectorDes = 'Recreational Vehicles',
issuerCik = '0000910619'
where entryId = '127787404'
End Function
The Script is complete, exiting....