ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rao, Satish" <satish....@fmr.com>
Subject RE: Stored procedures returning resultset
Date Tue, 09 Aug 2005 14:57:34 GMT
The issue is, we have to use <procedure> calls as a company policy and
not make <select> calls and hence I wanted to create the resultMap from
the procedure call.

-----Original Message-----
From: Koka [mailto:226057@gmail.com] 
Sent: Tuesday, August 09, 2005 10:55 AM
To: user-java@ibatis.apache.org
Subject: Re: Stored procedures returning resultset


No. You'll need to run extra select statement after executing the
procedure to retrieve data from temporary table:

Say your proc creates

CREATE GLOBAL TEMPORARY TABLE temp_emp_table (
  EMP_ID NUMBER,
  FNAME VARCHAR2(30),
  LNAME VARCHAR2(30),
) ON COMMIT DELETE ROWS;

Then you need

<statement id='getEmps' resultMAp='proc-result'>
       select * from temp_emp_table
</statement>

Mime
View raw message