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: : 151549
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '151549'
The Shares Amount is 27856000
The cusip is 260537105
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '260537105'
Number of Rows :25
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '8.97'
where entryId = '11125936'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0.36'
where entryId = '13022914'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0.36'
where entryId = '14678081'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '8.97'
where entryId = '14913395'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '15.83'
where entryId = '17426823'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '11.47'
where entryId = '18299282'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '2.41'
where entryId = '18570736'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '18615302'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '12.25'
where entryId = '23170328'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '10.99'
where entryId = '28779236'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '10.78'
where entryId = '30518702'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '14.92'
where entryId = '37276870'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '1.52'
where entryId = '40855092'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '22.59'
where entryId = '42067866'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '82.01'
where entryId = '42110082'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '1.3'
where entryId = '42167805'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '5.42'
where entryId = '42189129'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0.11'
where entryId = '42204048'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '42266111'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '42461456'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '42464438'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '42469908'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '50536174'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '72.45'
where entryId = '51210101'
update current13Fpositions set
compid = '151549',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001390840' ,
percentOut = '0'
where entryId = '52250531'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '260537105'
Number of Rows :0
End Function
The Script is complete, exiting....