Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie Help with '&' please

Re: Newbie Help with '&' please

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Sun, 21 Mar 1999 10:07:56 +0100
Message-ID: <36f4b6ed$0$5991@newton>


clarkr1 wrote
>How do you INSERT an '&' without getting
>prompted to insert values?

You can either prefix the ampersand & with the SQL*Plus escape character, or you could redefine the character that is used to prompt for parameters.

    SET ESC[APE] {\|c|OFF|ON}
    SET DEF[INE] {'&'|c|OFF|ON}

The default escape character is \. This also implies you need to type \ twice if you want a single \ character:

    select 'C:\\Temp'
    from dual;

Use SHOW ESCAPE to see the current setting (or SHOW ALL to see all settings).

    select 'You \& me'
    from dual;

If you do not use parameters, then you could simply use

    set define off

    select 'You & me'
    from dual;

Otherwise, you could use, for example, the ^ character for parameter substitution:

    set define '^'

Note that the single quotes are required. If you forget them, you'll get strange error messages the second time you issue the SET command.

Arjan. Received on Sun Mar 21 1999 - 03:07:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US