Announcement Announcement Module
Collapse
No announcement yet.
Updating SYSDATE to a stored procedure Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updating SYSDATE to a stored procedure


    Hi,
    1. I am calling a stored procedure using SimpleJdbcCall
    2. It is expecting a DATE as IN parameter
    3. I want to update the DATE as SYSDATE of the DB.
    4. How to pass a SYSDATE as an IN paramter to a stored procedure using spring jdbc.

    Please help me on how to update the SYSDATE in the stored procedure.?

    I have tried extending the StoredProcedure class and I couldnot succeed in SYSDATE.

    Thanks in advance!

    Regs
    Siva K

  • #2
    Originally posted by mk_siva View Post

    Hi,
    1. I am calling a stored procedure using SimpleJdbcCall
    2. It is expecting a DATE as IN parameter
    3. I want to update the DATE as SYSDATE of the DB.
    4. How to pass a SYSDATE as an IN paramter to a stored procedure using spring jdbc.

    Please help me on how to update the SYSDATE in the stored procedure.?

    I have tried extending the StoredProcedure class and I couldnot succeed in SYSDATE.

    Thanks in advance!

    Regs
    Siva K
    Is it always going to be a SYSDATE? Or sometimes you'll pass the value and other times you want the SYSDATE? If former, then don't pass anything in, just use SYSDATE in your stored procedure itself. If latter, then you have to define that you are passing the date in which case you have to pass the date. The alternative would be to define two functions, one which has date as parameter and one which doesn't. You can simply call one from the other and deal with the SYSDATE that way. Another alternative for you is to pass in NULL when you want the SYSDATE and then write logic in your stored procedure to check for NULL and use SYSDATE when it encounters it.

    Comment

    Working...
    X