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: : 130848
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130848'
The Shares Amount is 89371000
The cusip is 031538101
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '031538101'
Number of Rows :18
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '257.35'
where entryId = '1115142'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0.02'
where entryId = '1827050'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '6.18'
where entryId = '3726058'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0.67'
where entryId = '3916388'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '37.83'
where entryId = '5747349'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '1.4'
where entryId = '9753256'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0'
where entryId = '9987222'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '118.85'
where entryId = '10226914'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0.02'
where entryId = '11068046'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '15.38'
where entryId = '11449021'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '47.22'
where entryId = '11894169'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0.56'
where entryId = '12187881'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0'
where entryId = '12326998'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0'
where entryId = '12562152'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '23.9'
where entryId = '12933813'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0.55'
where entryId = '13467430'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0'
where entryId = '14821301'
update current13Fpositions set
compid = '130848',
sectorNum = '603005',
sectorDes = 'Semiconductor - Integrated Circuits',
issuerCik = '0001161963' ,
percentOut = '0'
where entryId = '14959211'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '031538101'
Number of Rows :0
End Function
The Script is complete, exiting....