Thanks Dave  for the quick reply. That worked perfectly ..!!

"You should be the change You want to see in the world"  -Mahatma Gandhi.

Regards,
Pramodreddy Kampalli 
Ph#: (703)-605-2137





[EMAIL PROTECTED] 
01/22/2008 12:05 PM
Please respond to
user-java@ibatis.apache.org


To
user-java@ibatis.apache.org
cc

Subject
Re: Result Map - duplicate columns






Try this:

Select DISTINCT
         A.Key as java1,
         B.Key as java2,
         C.Key as java3
From
          A,B,C


<result property="java1" column="java1"/>
<result property="java2" column="java2"/>
 <result property="java3" column="java3"/>

so that the column aliases match up with the column values.


Dave

We must begin not just to act, but to think, for there is no better slave
than the one who believes his slavery to be freedom, and we are in
no greater peril than when we cannot see the chains on our minds
because there are yet no chains on our feet.
-- Michael Reid




 
             pramodreddy.kampa 
             [EMAIL PROTECTED] 
                                                                        To 

             01/22/2008 11:59          user-java@ibatis.apache.org 
             AM                                                         cc 

 
                                                                   Subject 

             Please respond to         Result Map - duplicate columns 
             [EMAIL PROTECTED] 
                apache.org 
 
 
 
 





Hi there,

       I  currently use the query (using alias) as:

Select DISTINCT
         A.Key as java1,
         B.Key as java2,
         C.Key as java3
From
          A,B,C

But now for performance issues  when i tried to use result map like this:


<result property="java1" column="Key"/>
<result property="java2" column="Key"/>
 <result property="java3" column="Key"/>


Select DISTINCT
         A.Key
         B.Key
         C.Key
From
          A,B,C


Doesnot work, there are no errors but i could see the same values 
returning
in all the columns.

In another attempt I have tried like this:

               <result property="java1" column="Key" columnIndex ="0"/>
            <result property="java2" column="Key" columnIndex ="1"/>
                <result property="java3" column="Key" columnIndex ="2"/>


But doesnot work .. the result is same.

Can any help me fixing this problem...??


Regards,
Pramodreddy Kampalli





Reply via email to