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: : 131923
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '131923'
The Shares Amount is 3847000
The cusip is 092828102
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '092828102'
Number of Rows :9
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '107.21'
where entryId = '1569427'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '0.62'
where entryId = '1827158'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '0.39'
where entryId = '1983381'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '17.96'
where entryId = '2830986'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '10.05'
where entryId = '3726763'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '57.29'
where entryId = '7429463'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '80.47'
where entryId = '7529583'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '0'
where entryId = '9826216'
update current13Fpositions set
compid = '131923',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0000071525' ,
percentOut = '0'
where entryId = '10526748'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '092828102'
Number of Rows :0
End Function
The Script is complete, exiting....