Re: [Q] sqlplus: How to print '&'
From: Tony <tony_at_mebius-kb.kiev.ua>
Date: Mon, 1 Apr 2002 11:47:51 +0300
Message-ID: <a89381$47f$1_at_mail.mebius.kiev.ua>
01-APR-02 Received on Mon Apr 01 2002 - 10:47:51 CEST
Date: Mon, 1 Apr 2002 11:47:51 +0300
Message-ID: <a89381$47f$1_at_mail.mebius.kiev.ua>
[Quoted] "kwatch" <kwatch_at_lycos.jp> wrote in message
news:cf674456.0203312034.460031c9_at_posting.google.com...
> Hi,
>
> I have a question.
> How do I print character '&' in sqlplus?
>
> SQL> select sysdate 'foo & bar' from dual;
> Enter value for bar:
> old 1: select sysdate 'foo & bar' from dual
> new 1: select sysdate 'foo ' from dual
> select sysdate 'foo ' from dual
> *
> ERROR at line 1:
> ORA-00923: FROM keyword not found where expected
>
>
> I tried "&", '\&', '&&', etc... but I didn't succeed.
> Please teach me the way if you know.
>
> Regards,
> Makoto
Try this:
SQL> set escape ^
SQL> select sysdate "foo &^ bar" from dual;
foo & bar
01-APR-02 Received on Mon Apr 01 2002 - 10:47:51 CEST