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: : 130674
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130674'
The Shares Amount is 44004000
The cusip is 46119F107
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '46119F107'
Number of Rows :9
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '1.04'
where entryId = '3505415'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '9.16'
where entryId = '3730259'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '10.12'
where entryId = '10238990'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '7.51'
where entryId = '14332796'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '0.13'
where entryId = '14875112'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '0.23'
where entryId = '16938660'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '0'
where entryId = '19297239'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '0'
where entryId = '19297292'
update current13Fpositions set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710' ,
percentOut = '0'
where entryId = '19297339'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '46119F107'
Number of Rows :1
update archive13F set
compid = '130674',
sectorNum = '401006',
sectorDes = 'Drug Related Products',
issuerCik = '0001018710'
where entryId = '970074'
End Function
The Script is complete, exiting....