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: : 130574
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130574'
The Shares Amount is 4484000000
The cusip is 549463107
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '549463107'
Number of Rows :63
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.54'
where entryId = '1141471'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.04'
where entryId = '1144934'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '2.24'
where entryId = '1224166'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.04'
where entryId = '1264965'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '1359797'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '16.28'
where entryId = '1544373'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '1827752'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.03'
where entryId = '1983670'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.11'
where entryId = '2374532'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '52.2'
where entryId = '2420542'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.1'
where entryId = '2827895'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '2.61'
where entryId = '2832352'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '1.58'
where entryId = '2883144'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.02'
where entryId = '3081596'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '3165354'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '3.33'
where entryId = '3505756'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '3685748'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '6.64'
where entryId = '3730970'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '1.22'
where entryId = '3917222'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.02'
where entryId = '3948483'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '4574882'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '6.32'
where entryId = '5194298'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.38'
where entryId = '5218306'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '5415617'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.1'
where entryId = '5455461'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.19'
where entryId = '5468884'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '6484207'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '6530658'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '7534552'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '7537000'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '7538697'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '8502399'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '9057516'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '9169470'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '9419721'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '12182705'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '12187232'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '12191600'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.01'
where entryId = '12196250'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '13625818'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '13626136'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '13626497'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.01'
where entryId = '13626957'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.01'
where entryId = '13627345'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.01'
where entryId = '13627745'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.01'
where entryId = '13628138'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.01'
where entryId = '13628585'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.09'
where entryId = '16308554'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.09'
where entryId = '16308700'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.08'
where entryId = '16308859'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.08'
where entryId = '16309002'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.08'
where entryId = '16309149'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.07'
where entryId = '16309295'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.06'
where entryId = '16680428'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.06'
where entryId = '16680741'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.06'
where entryId = '16680997'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.06'
where entryId = '16681219'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.06'
where entryId = '16681429'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.1'
where entryId = '16681773'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.1'
where entryId = '16682069'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.1'
where entryId = '16682392'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0.04'
where entryId = '24144645'
update current13Fpositions set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240' ,
percentOut = '0'
where entryId = '130459997'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '549463107'
Number of Rows :40
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '970120'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '1594862'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '3687990'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '4399193'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '5240705'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '73865585'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '75775429'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '77733700'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '77781361'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '79929653'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '79945574'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '81762439'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '83867042'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '86102624'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '87803644'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '90135010'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '90815896'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '92570938'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '92205021'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '94254094'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '94373670'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '96028656'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '96560540'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '98788104'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '98417553'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '100818025'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '100989581'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '103293232'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '103550019'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '105402827'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '105764799'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '107250224'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '109068460'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '111855735'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '114287223'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '116761215'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '119646344'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '122410392'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '124955189'
update archive13F set
compid = '130574',
sectorNum = '605004',
sectorDes = 'Systems, Products & Data Transporation',
issuerCik = '0001006240'
where entryId = '127816338'
End Function
The Script is complete, exiting....