DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Date format problem

  1. #1
    Join Date
    Oct 2003
    Posts
    21

    Date format problem

    Dear All
    Any idea for the below error ?
    The below query working in one env and not working in other env. Both are of Oracle 806 version.
    Best Regards
    Bhaskara

    SQL> desc temp;
    Name Null? Type
    ------------------------------- -------- ----
    COMPUTER_NAME NOT NULL VARCHAR2(25)
    ROOM_NO NOT NULL VARCHAR2(15)
    PC_REFNO NOT NULL VARCHAR2(10)
    EXEC_DATE NOT NULL DATE
    START_TIME NOT NULL DATE
    END_TIME DATE
    EXIT_TIME DATE
    STATUS VARCHAR2(20)
    REMARKS VARCHAR2(4000)

    SQL> Select
    2 Computer_Name, Room_No, Pc_refno,
    3 to_char(exec_date,’dd/mm/yyyy hh:mi:ss AM’) Exec_Date,
    4 to_char(start_time,’hh:mi:ss AM’) Start_Time,
    5 to_char(end_time,’hh:mi:ss AM’) End_Time,
    6 to_char(exit_time,’hh:mi:ss AM’) Exit_Time,
    7 Status, Remarks
    8 From
    9 TEMP
    10 Where
    11 to_char(exec_date,’dd/mm/yyyy’) = to_char(sysdate,’dd/mm/yyyy’)
    12 Order by
    13 Exec_Date, Status, Room_No, Computer_Name, Pc_Refno;
    Bind variable "MM" not declared.
    real: 0
    SQL> Spool Off

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Make sure you use the proper apostrophe - chr(39).
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Oct 2003
    Posts
    21
    yes you are right.
    I could not find the difference my wordpad.

    Thanks
    Bhaskara

Posting Permissions

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


Click Here to Expand Forum to Full Width