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: : 130961
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130961'
The Shares Amount is 9405000
The cusip is 703186205
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '703186205'
Number of Rows :4
update current13Fpositions set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404' ,
percentOut = '0'
where entryId = '11708721'
update current13Fpositions set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404' ,
percentOut = '0'
where entryId = '13506834'
update current13Fpositions set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404' ,
percentOut = '0'
where entryId = '14300312'
update current13Fpositions set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404' ,
percentOut = '0'
where entryId = '16291152'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '703186205'
Number of Rows :7
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '90816460'
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '92571533'
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '94374307'
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '96561196'
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '98788798'
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '100818751'
update archive13F set
compid = '130961',
sectorNum = '605001',
sectorDes = 'Communication Equipment',
issuerCik = '0001059404'
where entryId = '103293342'
End Function
The Script is complete, exiting....