ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jahan Zaib <zaib.bscs1...@iiu.edu.pk>
Subject Help required
Date Fri, 12 Jun 2009 05:44:11 GMT
i am trying to run this but problem occursi have a  class

----
public class CompleteCallsReportBean implements Serializable{
/**
 *
 */
private static final long serialVersionUID = 2192836100387342196L;
/**
 *
 */

private String cg;
private String COUNT;
private String totalTime;
 public void setCG(String cg) {
        this.cg = cg == null ? null : cg.trim();
    }
 public void setCOUNT(String COUNT) {
        this.COUNT = COUNT == null ? null : COUNT.trim();
    }
 public void setTotalTime(String totalTime) {
        this.totalTime = totalTime == null ? null : totalTime.trim();
    }
 public String getCG() {
        return cg;
    }
 public String getCOUNT() {
        return COUNT ;
    }
 public String getTotalTime() {
        return totalTime;
    }

}


--------

And Sql Map related to that is
:

 <resultMap id="CompleteCallsReportMap"
class="com.prevail.bean.CompleteCallsReportBean" >
    <result column="total_time" property="totalTime" jdbcType="VARCHAR" />
    <result column="COUNT" property="COUNT" jdbcType="VARCHAR" />
    <result column="CG" property="cg" jdbcType="VARCHAR" />
    </resultMap>

<select id="get_complete_call_summary_by_date" parameterClass="String"
resultMap="CompleteCallsReportMap" >
  SELECT CG , COUNT(CD) COUNT,
           SUM  (
           TO_DATE(EDATE||' '|| etime  ,'DD-MM-YYYY HH24:MI:SS'  )  -
TO_DATE(ADATE||' '||  atime   ,'DD-MM-YYYY HH24:MI:SS' )
                 ) total_time
   FROM COMPLETE_CALLS
    WHERE EDATE =  #date:VARCHAR# HAVING
                      (
                       TRUNC (SUM  (
                                    TO_DATE(EDATE||' '|| etime  ,'DD-MM-YYYY
HH24:MI:SS'  )  -   TO_DATE(ADATE||' '||  atime   ,'DD-MM-YYYY HH24:MI:SS' )
                                    )   *24
                                          )
                        BETWEEN     0   AND  9
                   )
 GROUP BY
 CG order by total_time desc
</select>
---------------------------
But it did not fetch any data, where as simply query run fine
What i do ?
Kindly Help
-- 
Regards,
Jahan Zaib

Mime
View raw message