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

The Shares Amount is 2270000

The cusip is 37246C406
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '37246C406'
Number of Rows :3

update current13Fpositions set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' , percentOut = '1.97' where entryId = '65690098'
update current13Fpositions set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' , percentOut = '3.64' where entryId = '65706274'
update current13Fpositions set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' , percentOut = '352.96' where entryId = '65836465'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '37246C406'
Number of Rows :52

update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67668622'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66258189'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68280941'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67999343'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67619042'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67703349'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68143607'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66132809'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66461492'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68323696'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68355686'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68316864'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67592834'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67895656'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66423728'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67553094'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67782932'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67823938'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68367518'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68169372'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66332032'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '67564333'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66256626'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66212986'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66276220'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66041481'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66207079'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68321326'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '65765963'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66638877'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66522971'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66119778'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66985546'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68017954'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '65866926'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '65351903'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '66367713'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69185889'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69939187'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69940864'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69939840'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69361036'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69941156'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69359737'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '68911874'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69348289'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '70044561'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69928811'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69940227'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69939113'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '69940756'
update archive13F set compid = '130782', sectorNum = '401007', sectorDes = 'Drugs - Generic', issuerCik = '0000934473' where entryId = '73750565'
End Function
The Script is complete, exiting....