ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Layman" <Randy.Lay...@vocalocity.com>
Subject RE: executing several delete statements as one
Date Wed, 22 Nov 2006 12:11:54 GMT
I'm pretty sure you don't need the BEGIN/END tags or the commit.  You
want:
 
  <statement id="tabsDelete">
  <![CDATA[
        delete from a_tab; 
        delete from b_tab; 
        delete from c_tab; 
  ]]>
  </statement>

	Randy

-----Original Message-----
From: navrsale [mailto:navrsalemile@yahoo.ca] 
Sent: Tuesday, November 21, 2006 7:14 PM
To: user-java@ibatis.apache.org
Subject: executing several delete statements as one


hi,

I am trying to execute these Oracle delete statements with no parameters
as one pl/sql block:

TabsDelete.xml:
...
  <statement id="tabsDelete">
  <![CDATA[
     BEGIN 
        delete from a_tab; 
        delete from b_tab; 
        delete from c_tab; 
        commit; 
      END;
  ]]>
  </statement>

using this statement:

...
int ret = sqlMapClient.update( "tabsDelete" );

but the statement fails showing error:

[ERROR] com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in TabsDelete.xml.
--- The error occurred while applying a parameter map.
--- Check the tabsDelete-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: ORA-06550: line 1, column 28:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 1, column 16:
PL/SQL: SQL Statement ignored
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 1, column 24:
PL/SQL: SQL Statement ignored
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 1, column 32:
PL/SQL: SQL Statement ignored

complaining that these three tables do not exist, but tables are there
and I can execute pl/sql block from sql client with no problem.
Any idea what's wrong with TabsDelete.xml or update statement?
--
View this message in context:
http://www.nabble.com/executing-several-delete-statements-as-one-tf26826
92.html#a7483011
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message