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: : 142482
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '142482'
The Shares Amount is 11850000
The cusip is 617460209
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '617460209'
Number of Rows :25
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '0.84'
where entryId = '2195144'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '0.82'
where entryId = '8616895'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '17.3'
where entryId = '11177249'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '9.04'
where entryId = '12186584'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '15.11'
where entryId = '12779124'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '5.38'
where entryId = '13244039'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '4.22'
where entryId = '13968844'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '8.36'
where entryId = '14129315'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '14.6'
where entryId = '14568610'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '5.38'
where entryId = '14870441'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '8.27'
where entryId = '15461538'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '8.7'
where entryId = '15577698'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '15.86'
where entryId = '15760228'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '5.38'
where entryId = '15891146'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '8.62'
where entryId = '16825191'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '12.3'
where entryId = '17008075'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '8.27'
where entryId = '17098847'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '5.38'
where entryId = '17367833'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '8.27'
where entryId = '18304930'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '11.88'
where entryId = '18755730'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '7.91'
where entryId = '18944582'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '0'
where entryId = '31362974'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '11.44'
where entryId = '33588010'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '4.05'
where entryId = '42148104'
update current13Fpositions set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616' ,
percentOut = '0.34'
where entryId = '42233552'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '617460209'
Number of Rows :13
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '68333255'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '62487831'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '63446325'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '63453958'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '63526842'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '63447153'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64102678'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64965207'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64116368'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64963839'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64106568'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64952621'
update archive13F set
compid = '142482',
sectorNum = '999999',
sectorDes = 'N/A',
issuerCik = '0001055616'
where entryId = '64924020'
End Function
The Script is complete, exiting....