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: : 140318
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '140318'
The Shares Amount is 8490000
The cusip is 74728C307
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '74728C307'
Number of Rows :2
update current13Fpositions set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509' ,
percentOut = '0.15'
where entryId = '13024787'
update current13Fpositions set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509' ,
percentOut = '0.15'
where entryId = '14679913'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '74728C307'
Number of Rows :8
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '108683575'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '111372613'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '114007540'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '116650906'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '118990376'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '121728418'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '124592267'
update archive13F set
compid = '140318',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '9000000509'
where entryId = '127494952'
End Function
The Script is complete, exiting....