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: : 151576
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '151576'
The Shares Amount is 54244000
The cusip is 74344F106
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '74344F106'
Number of Rows :9
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '2.12'
where entryId = '37670419'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '3.87'
where entryId = '42116315'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '2.21'
where entryId = '42174158'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '1.86'
where entryId = '42177303'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '1.2'
where entryId = '42206261'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '23.12'
where entryId = '42244803'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '0.28'
where entryId = '42258697'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '0'
where entryId = '42468662'
update current13Fpositions set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659' ,
percentOut = '0'
where entryId = '42686010'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '74344F106'
Number of Rows :7
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '90816652'
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '92571731'
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '94374517'
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '96561411'
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '98789028'
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '100818989'
update archive13F set
compid = '151576',
sectorNum = '401001',
sectorDes = 'Biotechnology',
issuerCik = '0001268659'
where entryId = '103291594'
End Function
The Script is complete, exiting....