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: : 138465
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '138465'
The Shares Amount is 6610000
The cusip is 191042100
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '191042100'
Number of Rows :8
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '68.08'
where entryId = '7429602'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '0'
where entryId = '9754017'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '29.53'
where entryId = '10231385'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '0.91'
where entryId = '14872999'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '0'
where entryId = '24519795'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '0'
where entryId = '40896893'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '264.71'
where entryId = '42177073'
update current13Fpositions set
compid = '138465',
sectorNum = '102003',
sectorDes = 'Electronic Equipment',
issuerCik = '0000030828' ,
percentOut = '0'
where entryId = '51354545'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '191042100'
Number of Rows :0
End Function
The Script is complete, exiting....