• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ibatis Query Returns null

 
Nikhil Pasupukuntla
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am struck with a strange problem in my application since morning. When i try to run the following query using ibatis in my application



to get the total count of a database column ,the query returns null. When i remove the filters on product and customer in the query the query runs perfectly and returns the count. Its only when the filters for product or customer is present query returns a null. Below is the query generated by ibatis for the above sql map with only product filter.

SELECT SUM(message_count) AS trans_count FROM oms_product_summary
WHERE created_dt BETWEEN to_date(?,'mm/dd/yyyy') AND to_date(?,'mm/dd/yyyy')
[java.sql.PreparedStatement] - {pstm-100028} Parameters: [10/01/2011, 10/11/2011, LIDB]
[java.sql.PreparedStatement] - {pstm-100028} Types: [java.lang.String, java.lang.String, java.lang.String]

When i run the above query from SQLdeveloper it works perfectly!. Could any one with expertise on Ibatis point me what am i doing wrong here.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic