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: : 133086
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '133086'
The Shares Amount is 124012000
The cusip is 292845104
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '292845104'
Number of Rows :13
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0.68'
where entryId = '1141409'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '1.24'
where entryId = '1144869'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '2.14'
where entryId = '1223832'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '19.08'
where entryId = '1569675'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0'
where entryId = '1827428'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '2.24'
where entryId = '2374389'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '22.66'
where entryId = '2608223'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0.05'
where entryId = '2831610'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '2.02'
where entryId = '3504665'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0'
where entryId = '3685907'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0'
where entryId = '3746736'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0.68'
where entryId = '3916841'
update current13Fpositions set
compid = '133086',
sectorNum = '703004',
sectorDes = 'Industrial Metals & Minerals',
issuerCik = '0000352947' ,
percentOut = '0'
where entryId = '5247655'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '292845104'
Number of Rows :0
End Function
The Script is complete, exiting....