Results 1 to 10 of 10

Thread: need help on SimpleJdbcTemplate

  1. #1

    Unhappy need help on SimpleJdbcTemplate

    i need to get the list of email ids from the table by using the below query.
    "SELECT email_address FROM qtel_switch_ebill WHERE process_status='NO' AND (ebill_date+14)<=SYSDATE"
    In my project we are using simplejdbctemplate. Which method i need to use to execute this query.

    Thanks in advance.

    Regards,
    Sanjay

  2. #2

    Default

    pls anyone respond to this thread ..

  3. #3
    Join Date
    Nov 2007
    Posts
    177

    Default

    Have a look at the queryForList method.

    Code:
    jdbcTemplate.queryForList("select * from mytable");
    Regards,

    J.

  4. #4

    Default

    but in my project , we are using SimpleJdbcTemplate ..

  5. #5
    Join Date
    Nov 2007
    Posts
    177

    Default

    Quote Originally Posted by asanjayareddy View Post
    but in my project , we are using SimpleJdbcTemplate ..
    You do have this method defined on the SimpleJdbcTemplate class: see here:documentation

  6. #6

    Default

    Thank you for the response Balteo,

    those are methods are taking two parameters( sqlQuery and args), but in my case , i dont need any aarguments for the query.

  7. #7
    Join Date
    Nov 2007
    Posts
    177

    Default

    This method: see here takes a varargs as a second argument which means from 0 to n arguments. Therefore you can use it.

  8. #8

    Default

    ohhhhhhhhh.. Thank you so muchhh balteo

  9. #9
    Join Date
    Nov 2007
    Posts
    177

    Default

    You're welcome.

  10. #10

    Default

    Hi balteo,

    i am getting "org.springframework.jdbc.UncategorizedSQLExceptio n". please help me out.

    for more details:

    http://forum.springsource.org/showth...se-help-me-out

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •