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: : 139846
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '139846'
The Shares Amount is 2030000000
The cusip is 928856400
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '928856400'
Number of Rows :31
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.41'
where entryId = '2833651'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.06'
where entryId = '3917886'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.07'
where entryId = '9757838'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '11116013'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.1'
where entryId = '11195209'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '11778716'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '12192539'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '12320690'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '12327749'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '3.13'
where entryId = '12479781'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '12561923'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '13245084'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '13654427'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '14193704'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '14455389'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '15453692'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '15730788'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '15803687'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '16727419'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '17521515'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '18567672'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '19104807'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '22313536'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '23146592'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.11'
where entryId = '29332842'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '35982323'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.03'
where entryId = '42084554'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.01'
where entryId = '42148403'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '1.04'
where entryId = '42150038'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0.25'
where entryId = '42237764'
update current13Fpositions set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762' ,
percentOut = '0'
where entryId = '61249351'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '928856400'
Number of Rows :12
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '970284'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '63646613'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '64116269'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '64953761'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '64920572'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '90817878'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '92573007'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '94375859'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '96562820'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '98790514'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '100820537'
update archive13F set
compid = '139846',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '0000753762'
where entryId = '103291397'
End Function
The Script is complete, exiting....