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: : 130944
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130944'
The Shares Amount is 156024000
The cusip is 034425108
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '034425108'
Number of Rows :31
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '181.33'
where entryId = '1115146'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0.46'
where entryId = '1223419'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '5.41'
where entryId = '1264116'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '42.6'
where entryId = '1569350'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '1827057'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '26.51'
where entryId = '2827410'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '2.62'
where entryId = '2830760'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '59.34'
where entryId = '3031266'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0.74'
where entryId = '3273403'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '1.88'
where entryId = '3503328'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '353.03'
where entryId = '3726112'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0.7'
where entryId = '3916398'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '4.68'
where entryId = '5770490'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0.68'
where entryId = '6415936'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '8489613'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '9169400'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '188.84'
where entryId = '9340801'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '1.81'
where entryId = '9753277'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '3.2'
where entryId = '10023406'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '5.16'
where entryId = '10222701'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '113.97'
where entryId = '10227050'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '8.13'
where entryId = '11076817'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '1.15'
where entryId = '11225931'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '2.02'
where entryId = '11264091'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '13.76'
where entryId = '12083523'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '12562220'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '13401811'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0.23'
where entryId = '13467437'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '13898051'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '30.05'
where entryId = '15983079'
update current13Fpositions set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093' ,
percentOut = '0'
where entryId = '130458086'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '034425108'
Number of Rows :23
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '1594857'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '77779826'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '79944061'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '81762914'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '83865561'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '86101166'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '87802163'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '90133574'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '92203602'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '94252669'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '96027223'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '98416105'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '100988133'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '103548528'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '105763112'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '109066751'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '111853997'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '114285485'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '116759486'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '119644564'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '122408546'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '124953325'
update archive13F set
compid = '130944',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0000317093'
where entryId = '127814459'
End Function
The Script is complete, exiting....