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: : 145506
SELECT companies.* , sectors.level3des FROM companies, sectors WHERE companies.sector = sectors.level3num and compid = '145506'

The Shares Amount is 279440000

The cusip is 021361100
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '021361100'
Number of Rows :2

update current13Fpositions set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' , percentOut = '4.26' where entryId = '130635305'
update current13Fpositions set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' , percentOut = '0' where entryId = '131376673'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '021361100'
Number of Rows :59

update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '66747127'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '65515608'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '65667746'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '63419713'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '63954053'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '68542085'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '70098613'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '72095290'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '74762595'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '75751776'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '78588103'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '78490134'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '79859800'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '80957444'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '81820419'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '83765493'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '83804034'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '85966347'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '85918476'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '87890354'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '88471117'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '89811811'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '90803126'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '90547836'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '90265670'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '92167716'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '93510275'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '92970019'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '94332971'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '94633480'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '94212826'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '96070469'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '96473542'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '97413278'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '99771103'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '99918199'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '98732231'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '101900780'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '103534787'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '101980710'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '104634110'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '103845469'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '107210289'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '106101427'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '106114004'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '91932213'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '112736515'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '108946180'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '111681136'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '112744476'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '114166941'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '116658572'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '119241865'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '119203677'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '123070764'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '123207686'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '124596502'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '127685587'
update archive13F set compid = '145506', sectorNum = '999999', sectorDes = 'N/A', issuerCik = '' where entryId = '129592622'
End Function
The Script is complete, exiting....