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: : 145683
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '145683'
The Shares Amount is 0
The cusip is 13677F101
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '13677F101'
Number of Rows :7
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '11832768'
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '13287688'
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '14559774'
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '15913522'
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '35982285'
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '42192914'
update current13Fpositions set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '' ,
percentOut = '0'
where entryId = '131376680'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '13677F101'
Number of Rows :9
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '70307947'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '72238018'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '73918618'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '75942761'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '78067437'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '80398482'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '119241893'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '123207647'
update archive13F set
compid = '145683',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = ''
where entryId = '129592645'
End Function
The Script is complete, exiting....