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: : 131449
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '131449'
The Shares Amount is 28881000
The cusip is 02148M100
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '02148M100'
Number of Rows :10
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '138.5'
where entryId = '1309457'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '9.18'
where entryId = '3725869'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '150.87'
where entryId = '4374055'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '0'
where entryId = '4428231'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '18.11'
where entryId = '7429392'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '17.31'
where entryId = '8392076'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '0'
where entryId = '9826187'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '0'
where entryId = '10517144'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '0'
where entryId = '10526646'
update current13Fpositions set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650' ,
percentOut = '0'
where entryId = '10538127'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '02148M100'
Number of Rows :1
update archive13F set
compid = '131449',
sectorNum = '602001',
sectorDes = 'Application Software',
issuerCik = '0001139650'
where entryId = '969922'
End Function
The Script is complete, exiting....