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: : 130861
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130861'
The Shares Amount is 44240000
The cusip is 12612L108
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '12612L108'
Number of Rows :31
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '128'
where entryId = '1569531'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '4.06'
where entryId = '2831253'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '67.11'
where entryId = '3682459'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '2.93'
where entryId = '3727569'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.18'
where entryId = '5086683'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '64.94'
where entryId = '7529609'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '4.91'
where entryId = '9753742'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '18.34'
where entryId = '10229697'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '8.3'
where entryId = '14326787'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.04'
where entryId = '14677620'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '14822045'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.02'
where entryId = '14872528'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '2.1'
where entryId = '15071033'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '2.1'
where entryId = '15084996'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.04'
where entryId = '16193847'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.11'
where entryId = '16939430'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.3'
where entryId = '17014568'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '17073862'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '17105056'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '4.99'
where entryId = '17196013'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '17774840'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.04'
where entryId = '17977507'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '18658868'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.04'
where entryId = '19147290'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '23406429'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '24519787'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '26195598'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '27406722'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0.14'
where entryId = '28956476'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '5.65'
where entryId = '30669552'
update current13Fpositions set
compid = '130861',
sectorNum = '303004',
sectorDes = 'Property & Casualty Insurance',
issuerCik = '0001044566' ,
percentOut = '0'
where entryId = '32580026'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '12612L108'
Number of Rows :0
End Function
The Script is complete, exiting....