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: : 130947
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130947'
The Shares Amount is 77654000
The cusip is 469865109
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '469865109'
Number of Rows :9
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '0.07'
where entryId = '1827660'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '0'
where entryId = '3167899'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '5.34'
where entryId = '3682673'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '12.24'
where entryId = '3730375'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '0.37'
where entryId = '3917125'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '14.71'
where entryId = '4206051'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '32.68'
where entryId = '5086225'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '1.4'
where entryId = '5194285'
update current13Fpositions set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874' ,
percentOut = '82.3'
where entryId = '6793604'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '469865109'
Number of Rows :6
update archive13F set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874'
where entryId = '970102'
update archive13F set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874'
where entryId = '3688093'
update archive13F set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874'
where entryId = '4399214'
update archive13F set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874'
where entryId = '5240703'
update archive13F set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874'
where entryId = '6313072'
update archive13F set
compid = '130947',
sectorNum = '702005',
sectorDes = 'Lumber,Wood Production',
issuerCik = '0001056874'
where entryId = '6313146'
End Function
The Script is complete, exiting....