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: : 130765
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130765'
The Shares Amount is 9000000
The cusip is 616988101
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '616988101'
Number of Rows :19
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.44'
where entryId = '8616982'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '5.61'
where entryId = '11443270'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '30.86'
where entryId = '12256025'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.39'
where entryId = '13625853'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.48'
where entryId = '13626569'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.52'
where entryId = '13626997'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.52'
where entryId = '13627386'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.64'
where entryId = '13627824'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.64'
where entryId = '13628199'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.71'
where entryId = '13629128'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0'
where entryId = '16411351'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0'
where entryId = '22665456'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '5.05'
where entryId = '23158415'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '7.22'
where entryId = '23159553'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0.79'
where entryId = '23174554'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '0'
where entryId = '34311607'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '30.53'
where entryId = '42067940'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '52.22'
where entryId = '42184566'
update current13Fpositions set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686' ,
percentOut = '3.74'
where entryId = '51213811'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '616988101'
Number of Rows :4
update archive13F set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686'
where entryId = '16796586'
update archive13F set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686'
where entryId = '73705262'
update archive13F set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686'
where entryId = '51037813'
update archive13F set
compid = '130765',
sectorNum = '302004',
sectorDes = 'Closed - End Fund - Foreign',
issuerCik = '0000918686'
where entryId = '96633351'
End Function
The Script is complete, exiting....