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: : 130565
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130565'
The Shares Amount is 10815000
The cusip is 140065202
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '140065202'
Number of Rows :12
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '36.47'
where entryId = '1569467'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '12.19'
where entryId = '3727081'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '102.64'
where entryId = '7429535'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '0.94'
where entryId = '9753812'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '21.83'
where entryId = '10230072'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '242.03'
where entryId = '11112359'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '228.14'
where entryId = '13150974'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '10.37'
where entryId = '14326657'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '0'
where entryId = '14822154'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '1.61'
where entryId = '14872646'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '0'
where entryId = '17226426'
update current13Fpositions set
compid = '130565',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001004740' ,
percentOut = '0'
where entryId = '18823702'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '140065202'
Number of Rows :0
End Function
The Script is complete, exiting....