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: : 130741
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130741'
The Shares Amount is 15434000
The cusip is 025353103
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '025353103'
Number of Rows :26
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '1599350'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '7.3'
where entryId = '2830694'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '3.89'
where entryId = '3725928'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '130.66'
where entryId = '7529509'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '9169398'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0.56'
where entryId = '9753200'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '10.43'
where entryId = '9898202'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '21.74'
where entryId = '10226551'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '162.4'
where entryId = '11102623'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '11115482'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '6.67'
where entryId = '12986737'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '14821207'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '14871677'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '827.12'
where entryId = '16099668'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '770.15'
where entryId = '16173700'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '770.15'
where entryId = '17160220'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '17226246'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '18432990'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '18765770'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '23406657'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '189.73'
where entryId = '23465813'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '24519094'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '26910602'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '36595635'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '41123279'
update current13Fpositions set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087' ,
percentOut = '0'
where entryId = '130458024'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '025353103'
Number of Rows :22
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '77779774'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '79944008'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '81762810'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '83865507'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '86101115'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '87802111'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '90133523'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '92203552'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '94252618'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '96027168'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '98416050'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '100988080'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '103548476'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '105763057'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '109066695'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '111853938'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '114285425'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '116759427'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '119644502'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '122408483'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '124953265'
update archive13F set
compid = '130741',
sectorNum = '402001',
sectorDes = 'Health Care Plans',
issuerCik = '0001028087'
where entryId = '127814401'
End Function
The Script is complete, exiting....