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: : 159644
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '159644'
The Shares Amount is 9000000
The cusip is 57060U431
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '57060U431'
Number of Rows :7
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '1.06'
where entryId = '42173707'
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '141.86'
where entryId = '42189312'
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '54.68'
where entryId = '42189745'
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '0.65'
where entryId = '42199010'
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '0.04'
where entryId = '42204698'
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '0'
where entryId = '42462629'
update current13Fpositions set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110' ,
percentOut = '0.5'
where entryId = '51213345'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '57060U431'
Number of Rows :2
update archive13F set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110'
where entryId = '43898147'
update archive13F set
compid = '159644',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004110'
where entryId = '97563482'
End Function
The Script is complete, exiting....