GeeCON Prague 2014*
The moose likes Spring and the fly likes How to query using NamedParameterJdbcTemplate.query() method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to query using NamedParameterJdbcTemplate.query() method?" Watch "How to query using NamedParameterJdbcTemplate.query() method?" New topic
Author

How to query using NamedParameterJdbcTemplate.query() method?

antsi klando
Ranch Hand

Joined: May 10, 2011
Posts: 46
I am not able to fetch two column values from the Database.

PFB the code



where the sql query is "select po_no, created_dtm from purchase_order where cust_order_no =765765878"
outputKeyNames = [poNumber, created_dtm].

The problem is that it fetches the poNumber for the first time.For the created_dtm it returns null.

Please suggest a method.
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
Check the date format/timezone in db.
 
GeeCON Prague 2014
 
subject: How to query using NamedParameterJdbcTemplate.query() method?