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: : 130662
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130662'
The Shares Amount is 30630000
The cusip is 193068202
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '193068202'
Number of Rows :8
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '0'
where entryId = '40865000'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '26.12'
where entryId = '42107998'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '19.37'
where entryId = '42157859'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '79.99'
where entryId = '42161776'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '30.2'
where entryId = '42175710'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '0.02'
where entryId = '42206577'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '1.31'
where entryId = '42221968'
update current13Fpositions set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005' ,
percentOut = '29.87'
where entryId = '42231753'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '193068202'
Number of Rows :9
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '65722758'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '63965498'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '66802946'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '70575702'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '72469124'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '89650584'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '91637181'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '93919678'
update archive13F set
compid = '130662',
sectorNum = '105003',
sectorDes = 'Catalog & Mail Order Houses',
issuerCik = '0001018005'
where entryId = '95606876'
End Function
The Script is complete, exiting....