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: : 133075
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '133075'
The Shares Amount is 999083000
The cusip is 375766102
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '375766102'
Number of Rows :41
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '1.38'
where entryId = '597719'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.33'
where entryId = '969567'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '1359802'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '1367060'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '1367479'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '1493160'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '1493173'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '1599444'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '2333837'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '2337348'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.45'
where entryId = '2374443'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '3091416'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '3579033'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '3685779'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '3746603'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '4073685'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '4077353'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '4415237'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '4428192'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '4436041'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.34'
where entryId = '13625714'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.3'
where entryId = '13626421'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.3'
where entryId = '13626826'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.39'
where entryId = '13627240'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.08'
where entryId = '15994752'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.84'
where entryId = '15994844'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.85'
where entryId = '15994933'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.52'
where entryId = '16308158'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.21'
where entryId = '16308273'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.55'
where entryId = '16308395'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.57'
where entryId = '16308533'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.56'
where entryId = '16308677'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.55'
where entryId = '16308835'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.6'
where entryId = '16308981'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.6'
where entryId = '16309127'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.54'
where entryId = '16309271'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.2'
where entryId = '16680427'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.23'
where entryId = '16680996'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.23'
where entryId = '16681217'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0.23'
where entryId = '16681428'
update current13Fpositions set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499' ,
percentOut = '0'
where entryId = '130459421'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '375766102'
Number of Rows :23
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '1119109'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '77780899'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '79945122'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '81762554'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '83866608'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '86102196'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '87803200'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '90134581'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '92204592'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '94253668'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '96028231'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '98417126'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '100989149'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '103549576'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '105764288'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '109067944'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '111855212'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '114286701'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '116760694'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '119645809'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '122409835'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '124954628'
update archive13F set
compid = '133075',
sectorNum = '502005',
sectorDes = 'Personal Products',
issuerCik = '0000041499'
where entryId = '127815775'
End Function
The Script is complete, exiting....