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: : 138839
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '138839'
The Shares Amount is 76140000
The cusip is 00752H102
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '00752H102'
Number of Rows :28
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.13'
where entryId = '12476682'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '13645038'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.13'
where entryId = '14003849'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.14'
where entryId = '14871451'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.13'
where entryId = '15803498'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.13'
where entryId = '16727268'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.43'
where entryId = '17014199'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '6.57'
where entryId = '17274298'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '18273109'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '18355020'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '18528840'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.13'
where entryId = '18567606'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '15.1'
where entryId = '19684633'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '15.1'
where entryId = '19697698'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.06'
where entryId = '23166931'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '23425193'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '3.41'
where entryId = '23441337'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.17'
where entryId = '24137936'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '24518959'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '195.13'
where entryId = '24569519'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '24928038'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0.07'
where entryId = '28778890'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '7.95'
where entryId = '29135642'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '179.34'
where entryId = '29669361'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '5.29'
where entryId = '29956817'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '34255070'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '41123178'
update current13Fpositions set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651' ,
percentOut = '0'
where entryId = '129953954'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '00752H102'
Number of Rows :38
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '66707524'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '65134129'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '65858692'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '65633701'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '63415866'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '64014894'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '64202053'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '68539991'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '70053066'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '65002792'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '72086248'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '72368717'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '73833134'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '75802601'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '78169191'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '79848573'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '81735353'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '83796572'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '83506783'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '85910131'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '86636160'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '87915692'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '89953457'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '92055261'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '94107788'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '96085950'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '98402495'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '100705676'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '103272671'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '105862067'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '108321755'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '110933140'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '113589913'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '116251813'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '118834561'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '121563588'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '124589669'
update archive13F set
compid = '138839',
sectorNum = '102001',
sectorDes = 'Appliances',
issuerCik = '0000745651'
where entryId = '126997628'
End Function
The Script is complete, exiting....