Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011

    Unanswered: Procedure to update a column

    i created the following procedure that will update status to closed and it is failling:

    create or replace procedure hr_updatestatus_sp
    update hr_staffhandsetbenefits_tb
    set stat_code='20'
    where sysdate >= trunc(due_date)

    can anyone help me figure out what is wrong?

  2. #2
    Join Date
    Mar 2007
    Quote Originally Posted by sellyh19 View Post
    can anyone help me figure out what is wrong?
    Without the description of the table (at least types of STAT_CODE and DUE_DATE columns) and exact description of 'failing' behavior, it is impossible without some kind of guessing. Let me do so - it is Friday afternoon and your Oracle database needs rest.

    By the way, the WHERE condition quite uncommon and hard to understand. I would change it to
    WHERE due_date < TRUNC(sysdate)+1
    (maybe you would call this condition 'failing').

  3. #3
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    Here is a picture of my car.
    It does not go.
    Tell me how to make my car go.

    It is really, Really, REALLY difficult to fix a problem that can not be seen.
    use COPY & PASTE so we can see what you do & how Oracle responds.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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