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: : 159822
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '159822'
The Shares Amount is 851170000
The cusip is 92336Y107
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '92336Y107'
Number of Rows :2
update current13Fpositions set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288' ,
percentOut = '0.26'
where entryId = '42150021'
update current13Fpositions set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288' ,
percentOut = '0.16'
where entryId = '130402049'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '92336Y107'
Number of Rows :23
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '67086469'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '65294812'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '63575937'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '68620263'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '70326863'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '72074538'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '74055755'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '75886560'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '77751191'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '79806323'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '81916270'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '83943700'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '86040377'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '88148046'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '106360095'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '109900074'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '111761918'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '114201101'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '116185913'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '119493365'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '122315399'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '124883574'
update archive13F set
compid = '159822',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004288'
where entryId = '127716049'
End Function
The Script is complete, exiting....