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: : 130766
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130766'
The Shares Amount is 164893000
The cusip is 55277J108
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '55277J108'
Number of Rows :5
update current13Fpositions set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106' ,
percentOut = '7.61'
where entryId = '26734595'
update current13Fpositions set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106' ,
percentOut = '0.08'
where entryId = '29136976'
update current13Fpositions set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106' ,
percentOut = '0'
where entryId = '31252854'
update current13Fpositions set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106' ,
percentOut = '57.96'
where entryId = '32679471'
update current13Fpositions set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106' ,
percentOut = '18.19'
where entryId = '34585614'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '55277J108'
Number of Rows :8
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '67543578'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '65588227'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '65858396'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '64077582'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '64203809'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '32247693'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '83508185'
update archive13F set
compid = '130766',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0001401106'
where entryId = '86636203'
End Function
The Script is complete, exiting....