escape character & (ampersand) in oracle

SQL-editors prompt for variables prefixed with ‘&’ in SQL statements

disable ampersand (kaufmännisches und) ‘&’ with “set define off” in TOAD or SQL*Plus

e.g.

set define off;
insert into PERSON(ID, NAME) values (1, ‘you & me’);
set define on;

use “execute as script” instead of “execute statement”

Advertisements
This entry was posted in howtos and tagged , , . Bookmark the permalink.

3 Responses to escape character & (ampersand) in oracle

  1. electrobabe says:

    heute wieder gebraucht :)

  2. giggs says:

    saved my day! :) thx

  3. thanx a lot.
    greetings
    roland

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s