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: : 173912
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '173912'
The Shares Amount is 9000000
The cusip is 87975E305
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '87975E305'
Number of Rows :9
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '11.6'
where entryId = '132305213'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '33.17'
where entryId = '131179234'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '0.08'
where entryId = '130748743'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '13.23'
where entryId = '131782316'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '0.03'
where entryId = '131719098'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '17.43'
where entryId = '130174166'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '0'
where entryId = '130477759'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '0.14'
where entryId = '130913888'
update current13Fpositions set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768' ,
percentOut = '8.89'
where entryId = '132468073'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '87975E305'
Number of Rows :13
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '123844389'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '123502788'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '124280899'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '125734092'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '125044316'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '125798336'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '126414061'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '127469924'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '127866891'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '129861853'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '129377270'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '128778811'
update archive13F set
compid = '173912',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000009768'
where entryId = '127980883'
End Function
The Script is complete, exiting....