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: : 135549
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '135549'
The Shares Amount is 15780000
The cusip is 74340R104
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '74340R104'
Number of Rows :9
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '0.28'
where entryId = '3732817'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '0'
where entryId = '9756690'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '17.71'
where entryId = '10246498'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '0'
where entryId = '10523245'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '95.84'
where entryId = '10835304'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '4.31'
where entryId = '14877416'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '0'
where entryId = '18825753'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '0'
where entryId = '23402055'
update current13Fpositions set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844' ,
percentOut = '0'
where entryId = '23406757'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '74340R104'
Number of Rows :2
update archive13F set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844'
where entryId = '83508510'
update archive13F set
compid = '135549',
sectorNum = '101003',
sectorDes = 'Auto Parts',
issuerCik = '0000948844'
where entryId = '86636290'
End Function
The Script is complete, exiting....