Results 1 to 2 of 2

Thread: sysdate

  1. #1
    Join Date
    Feb 2004
    Posts
    86

    Unanswered: sysdate

    Why does x_date return NULL if I don't parse a parameter?

    PROCEDURE testdate
    ( x_date IN date DEFAULT sysdate
    )
    IS

    BEGIN
    dbms_output.put_line('X_DATE=' || X_DATE);
    dbms_output.put_line('SYSDATE=' || SYSDATE);
    END;
    Last edited by kram66; 10-26-05 at 21:48.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Does it? Did you turn serveroutput ON?
    Code:
    SQL> create or replace procedure testdate (x_date in date default sysdate)
      2  is
      3  begin
      4    dbms_output.put_line('x_date  = ' || x_date);
      5    dbms_output.put_line('sysdate = ' || sysdate);
      6  end;
      7  /
    
    Procedure created.
    
    SQL> set serveroutput on
    SQL> execute testdate;
    x_date  = 27.10.05
    sysdate = 27.10.05
    
    PL/SQL procedure successfully completed.
    
    SQL>

Posting Permissions

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