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: : 133053
SELECT companies.* , sectors.level3des
FROM companies, sectors
WHERE companies.sector = sectors.level3num and compid = '133053'
The Shares Amount is 67332000
The cusip is 039793104
NOT OLD
Retrive Rows from Table:
select * from current13Fpositions where cusip = '039793104'
Number of Rows :10
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '6.65'
where entryId = '1264142'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0'
where entryId = '1493494'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0.04'
where entryId = '1827083'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0.02'
where entryId = '2207500'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '42.31'
where entryId = '2608501'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0.05'
where entryId = '2830818'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0'
where entryId = '3168041'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '13.29'
where entryId = '3503410'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0'
where entryId = '3746551'
update current13Fpositions set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794' ,
percentOut = '0'
where entryId = '4428230'
End Function
Retrive Rows from Table:
select * from archive13F where cusip = '039793104'
Number of Rows :1
update archive13F set
compid = '133053',
sectorNum = '304002',
sectorDes = 'Property Management',
issuerCik = '0001013794'
where entryId = '970312'
End Function
The Script is complete, exiting....