Sankar,
You might want to try select first_name firstname, last_name lastname , '' as designation from employee

In Oracle the empty string '' is also null. My suspicion is the problem here is the Oracle jdbc driver not knowing what the designation column's datatype is, is setting up something bizarre to account for any possibility, hence the memory consumption. The empty string ('') while null, should wind up getting typed as a varchar so that may alleviate the problem. If that doesn't work, I'd try joining employees to some other (small) table and grabbing a column you know is null from that table. For example. create table party_ethics ( party_name, varchar2(10) , ethical_constraints varchar2(10));
insert into party_ethics values ('Democrat',NULL);
insert into party_ethics values ('Republican',NULL);
select first_name,
        last_name
        ethical_constraints as designation
from employees ,
       party_ethics
where party_name = 'Democrat'

That will get you a varchar2(10) column with a null value in it.

Sankar Reddy wrote:
Say for example:
OPEN emp FOR SELECT First_name as FIRSTNAME,
Last_name as LASTNAME,
            NULL as DESIGNATION
FROM
            EMPLOYEE

Now the resultMap would look like this:
<resultMap id="getEmployees" class="employeesDTO" >
                                    <result property="firstName"
column="FIRSTNAME" />
                                    <result property="lastName"
column="LASTNAME" /> <result property="desig"
column="DESIGNATION" />
</resultMap>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to