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: : 159686
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '159686'
The Shares Amount is 9000000
The cusip is 06740P239
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '06740P239'
Number of Rows :5
update current13Fpositions set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152' ,
percentOut = '0.02'
where entryId = '42167720'
update current13Fpositions set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152' ,
percentOut = '0.14'
where entryId = '42193868'
update current13Fpositions set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152' ,
percentOut = '0'
where entryId = '42463672'
update current13Fpositions set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152' ,
percentOut = '0'
where entryId = '42470033'
update current13Fpositions set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152' ,
percentOut = '3.61'
where entryId = '51208144'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '06740P239'
Number of Rows :16
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '66319959'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '67700017'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '68054122'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '66364212'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '64590880'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '64918973'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '64649062'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '69610983'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '69557185'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '71402006'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '71754731'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '73425656'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '75248020'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '77603208'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '43897972'
update archive13F set
compid = '159686',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '9000004152'
where entryId = '97563309'
End Function
The Script is complete, exiting....