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: : 133313
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '133313'
The Shares Amount is 13013000
The cusip is 535679104
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '535679104'
Number of Rows :7
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '0'
where entryId = '1367110'
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '432.56'
where entryId = '1569936'
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '0.02'
where entryId = '1827739'
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '0.25'
where entryId = '2832314'
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '0'
where entryId = '3578971'
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '0'
where entryId = '3596541'
update current13Fpositions set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052' ,
percentOut = '0'
where entryId = '3746665'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '535679104'
Number of Rows :27
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '80192053'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '79724868'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '81307875'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '81826326'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '81877440'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '82555560'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '83161139'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '83589566'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '84052640'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '83984393'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '84457458'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '84802445'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '86503928'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '86153408'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '86294863'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '87273361'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '87070496'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '87877830'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '88012194'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '88927649'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '89249816'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '91096531'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '91224872'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '90336481'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '92365262'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '92444412'
update archive13F set
compid = '133313',
sectorNum = '102004',
sectorDes = 'Home Furnishing Stores',
issuerCik = '0001023052'
where entryId = '95580286'
End Function
The Script is complete, exiting....