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: : 130748
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '130748'
The Shares Amount is 9936000
The cusip is 871630208
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '871630208'
Number of Rows :3
update current13Fpositions set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023' ,
percentOut = '0.03'
where entryId = '42202642'
update current13Fpositions set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023' ,
percentOut = '0.02'
where entryId = '42208938'
update current13Fpositions set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023' ,
percentOut = '1.47'
where entryId = '67078213'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '871630208'
Number of Rows :10
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67076803'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67077188'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67171513'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67078010'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67077805'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67077398'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '67077604'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '89537927'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '91488878'
update archive13F set
compid = '130748',
sectorNum = '901001',
sectorDes = 'Independent Oil & Gas',
issuerCik = '0001029023'
where entryId = '93851467'
End Function
The Script is complete, exiting....