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: : 145678
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '145678'
The Shares Amount is 0
The cusip is G1368B102
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = 'G1368B102'
Number of Rows :1
update current13Fpositions set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = '' ,
percentOut = '0'
where entryId = '42087386'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = 'G1368B102'
Number of Rows :10
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '67544892'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '65016337'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '63525840'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '63918691'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '69943246'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '71199279'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '72566114'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '75112353'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '76417137'
update archive13F set
compid = '145678',
sectorNum = '101005',
sectorDes = 'Trucks & Other Vehicles',
issuerCik = ''
where entryId = '79492150'
End Function
The Script is complete, exiting....