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: : 131885
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '131885'
The Shares Amount is 192642000
The cusip is 109490102
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '109490102'
Number of Rows :16
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0'
where entryId = '32524832'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '824.23'
where entryId = '33000952'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '86.4'
where entryId = '33282479'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '51.91'
where entryId = '40856200'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '1.04'
where entryId = '42050087'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '16.87'
where entryId = '42152228'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '10.38'
where entryId = '42192183'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0.93'
where entryId = '42198148'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0.01'
where entryId = '42203338'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0'
where entryId = '42464116'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0'
where entryId = '42465640'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0'
where entryId = '42468666'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0'
where entryId = '42469640'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '0'
where entryId = '44620389'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '106.49'
where entryId = '46033221'
update current13Fpositions set
compid = '131885',
sectorNum = '703003',
sectorDes = 'Gold',
issuerCik = '0000938113' ,
percentOut = '105.14'
where entryId = '47143073'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '109490102'
Number of Rows :0
End Function
The Script is complete, exiting....