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: : 139442
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '139442'
The Shares Amount is 1221000000
The cusip is 315621888
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '315621888'
Number of Rows :12
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.01'
where entryId = '9754645'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '15.32'
where entryId = '12459061'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0'
where entryId = '12479767'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.27'
where entryId = '13262004'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.12'
where entryId = '15593784'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.12'
where entryId = '16963430'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.12'
where entryId = '19064674'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.2'
where entryId = '40887045'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.89'
where entryId = '42138482'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '1.34'
where entryId = '42149029'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0.12'
where entryId = '42209101'
update current13Fpositions set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317' ,
percentOut = '0'
where entryId = '42247040'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '315621888'
Number of Rows :2
update archive13F set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317'
where entryId = '970397'
update archive13F set
compid = '139442',
sectorNum = '101002',
sectorDes = 'Auto Manufacturers',
issuerCik = '0000842317'
where entryId = '34123323'
End Function
The Script is complete, exiting....