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: : 130909
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130909'
The Shares Amount is 27929000
The cusip is 598251106
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '598251106'
Number of Rows :35
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0.25'
where entryId = '1265051'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '1827824'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '3685875'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '7.12'
where entryId = '3731461'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '18.08'
where entryId = '6416506'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '7.16'
where entryId = '6564354'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2'
where entryId = '9755975'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '12.93'
where entryId = '10224404'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '21.64'
where entryId = '10242703'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '169.58'
where entryId = '11112463'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '11153072'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '5.19'
where entryId = '12291175'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2.04'
where entryId = '13024176'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '161.92'
where entryId = '13151072'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '15.28'
where entryId = '13242875'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '4.62'
where entryId = '13809407'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '16'
where entryId = '14310238'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '5.04'
where entryId = '14327833'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2.04'
where entryId = '14679297'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '14825414'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0.21'
where entryId = '14876215'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2.04'
where entryId = '16195647'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '15.55'
where entryId = '16353276'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '15.55'
where entryId = '16354530'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '16955437'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0.61'
where entryId = '17015789'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '7.5'
where entryId = '17728084'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '17776313'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2.04'
where entryId = '17979289'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '7.71'
where entryId = '18493253'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2.04'
where entryId = '19149034'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '46.35'
where entryId = '22714494'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '2.33'
where entryId = '23174396'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '4.78'
where entryId = '24145057'
update current13Fpositions set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379' ,
percentOut = '0'
where entryId = '24521424'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '598251106'
Number of Rows :1
update archive13F set
compid = '130909',
sectorNum = '301009',
sectorDes = 'Domestic Regional Banks',
issuerCik = '0001051379'
where entryId = '970491'
End Function
The Script is complete, exiting....