Announcement Announcement Module
Collapse
No announcement yet.
need help on SimpleJdbcTemplate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    pls anyone respond to this thread ..

    Comment


    • #3
      Have a look at the queryForList method.

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

      J.

      Comment


      • #4
        but in my project , we are using SimpleJdbcTemplate ..

        Comment


        • #5
          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

          Comment


          • #6
            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.

            Comment


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

              Comment


              • #8
                ohhhhhhhhh.. Thank you so muchhh balteo

                Comment


                • #9
                  You're welcome.

                  Comment


                  • #10
                    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

                    Comment

                    Working...
                    X