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: : 130710
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130710'
The Shares Amount is 79800000
The cusip is 48020T101
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '48020T101'
Number of Rows :35
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '2.42'
where entryId = '29332552'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '2.99'
where entryId = '29956964'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '31253386'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '15.85'
where entryId = '33103708'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '34255183'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '3.91'
where entryId = '38324861'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '1.25'
where entryId = '40853208'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '4.81'
where entryId = '41651475'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '2.95'
where entryId = '41674809'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0.16'
where entryId = '42078710'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0.04'
where entryId = '42094567'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '17.49'
where entryId = '42106297'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '25.82'
where entryId = '42117083'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '6.64'
where entryId = '42146130'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '454.32'
where entryId = '42155500'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '30.2'
where entryId = '42162012'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '7.43'
where entryId = '42163139'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '3.87'
where entryId = '42175855'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0.16'
where entryId = '42181566'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '56.34'
where entryId = '42183425'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '3.13'
where entryId = '42185886'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '75.63'
where entryId = '42186588'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '8.2'
where entryId = '42224975'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '78.32'
where entryId = '42228260'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '100.45'
where entryId = '42239368'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '30.98'
where entryId = '42241667'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '42457126'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '42458405'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '42468045'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0.42'
where entryId = '43979377'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '30.2'
where entryId = '45418890'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '46127091'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '1.45'
where entryId = '46539828'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '48089461'
update current13Fpositions set
compid = '130710',
sectorNum = '502007',
sectorDes = 'Textile - Apparel Clothing',
issuerCik = '0000874016' ,
percentOut = '0'
where entryId = '49517166'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '48020T101'
Number of Rows :0
End Function
The Script is complete, exiting....