From: sucheta T. <su...@vb...> - 2003-12-11 16:17:35
|
Thanks, It works now. Sucheta > Hi, > > I am sorry but I should have looked more closely at your query as I only > addressed one problem. > > idSQL should be an sql statement that retrieves the primary keys of the > rows that should be deleted. Here, it would be: > > --idSQL "select nrdb_entry_id from dots.nrdbentry where nrdb_entry_id = 3" > > I don't think the error you got was caused by using the wrong sql > statement. Try running with this and --verbose and see if you still get an > error. > > Debbie > > > > > > > On Thu, 11 Dec 2003, sucheta Tripathy wrote: > >> Hi , >> >> After I tried the query you suggested it gives the following error. >> >> DBD::Oracle::st fetchrow_array failed: ERROR no statement executing >> (perhaps you >> need to call execute first) [for Statement "delete from DoTS.NRDBEntry >> where nr >> db_entry_id=3"] at /home/apps/gus/gushome/bin/deleteEntries.pl line 51. >> deleting ids from DoTS::NRDBEntry >> >> Sucheta >> > Hi, >> > >> > The sql query should have been --idSQL 'delete from DoTS.NRDBEntry >> > where nrdb_entry_id=1' rather than ...DoTS::NRDBEntry... >> > >> > Debbie >> > >> > >> > On Wed, 10 Dec 2003, sucheta Tripathy wrote: >> > >> >> >> >> Hi, >> >> >> >> I have been trying to use the deleteEntries.pl program to delete some >> of >> >> the rows inserted into the DoTS::NRDBEntry table. >> >> >> >> First it gave an insufficient privilege error, so when we looked at >> the >> >> code at line 30, 31, we noticed, it calls the >> >> $gusconfig->getReadOnlyDatabaseLogin(), >> >> $gusconfig->getReadOnlyDatabasePassword() >> >> >> >> which has only readonly privileges (From the .gus.properties file). >> >> >> >> So I changed it to >> >> >> >> $gusconfig->getDatabaseLogin(), >> >> $gusconfig->getDatabasePassword(), at those 2 lines which has read, >> >> write, >> >> delete privileges. >> >> >> >> The options I have used are: >> >> >> >> deleteEntries.pl --idSQL 'delete from DoTS::NRDBEntry where >> >> nrdb_entry_id=1' --table DoTS::NRDBEntry >> >> >> >> It is throwing the following errors: >> >> >> >> Reading properties from /home/apps/gus/.gus.properties >> >> The login is GUSrw >> >> DBD::Oracle::st execute failed: ORA-00933: SQL command not properly >> >> ended >> >> (DBD E >> >> RROR: OCIStmtExecute) [for Statement "delete from DoTS::NRDBEntry >> where >> >> nrdb_ent >> >> ry_id=3" with ParamValues: :NRDBEntry=undef] at >> >> /home/apps/gus/gushome/lib/perl/ >> >> GUS/ObjRelP/DbiDbHandle.pm line 82. >> >> Execute FAILED: ORA-00933: SQL command not properly ended (DBD ERROR: >> >> OCIStmtExe >> >> cute) >> >> sql_cmd: >> >> delete from DoTS::NRDBEntry where nrdb_entry_id=3 >> >> DBD::Oracle::st fetchrow_array failed: ERROR no statement executing >> >> (perhaps you >> >> need to call execute first) [for Statement "delete from >> DoTS::NRDBEntry >> >> where n >> >> rdb_entry_id=3" with ParamValues: :NRDBEntry=undef] at >> >> /home/apps/gus/gushome/bi >> >> n/deleteEntries.pl line 51. >> >> deleting ids from DoTS::NRDBEntry >> >> >> > >> >> >> > -- Sucheta Tripathy Virginia Bioinformatics Institute 1880 pratt drive,Bldg XV Virginia tech. Blacksburg Virginia VA 24061 phone-(540)231-8138 |