Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    153

    Unanswered: SQL statement - UPDATE

    All,

    Following is my table structure :

    Table Name : A

    Col 1 : Query_Key Number(3)
    Col 2: Query_text Varchar2(2000)

    I would like to update the Query_txt column with the following value :

    SQL> Update A
    Set Query_txt = ' Select To_char(SYSDATE,'DD MON YYYY'), To_char(SYSDATE,'DD MM YY') from Dual'
    where Query_key = 3;

    The above statement is showing the following err msg :
    ERROR at line 2:
    ORA-00933: SQL command not properly ended

    I can understand the problem is due to the single quotes, but unable to resolve.

    Need your help.

    Thanks
    JD

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    There should be two apostrophes on date format:
    Code:
    UPDATE A
       SET query_txt =
              ' Select To_char(SYSDATE,''DD MON YYYY''), To_char(SYSDATE,''DD MM YY'') from Dual'
     WHERE query_key = 3;

Posting Permissions

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