Difficulty inserting due to &

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rp_3

    Difficulty inserting due to &

    Hello,

    I am attempting to insert the following but am having difficulty with
    the "&" symbol being accepted as a literal character. If I preced the
    "&" with a backslash "\", when I execute via sqlplus, the script waits
    for input, however if I execute via sql window in TOAD, the record is
    inserted as expected.

    Any and all suggestions greatly appreciated,
    Richard

    sourceid = number(18)
    url = varchar2(250)
    name = varchar2(50)

    INSERT INTO SOURCE ( SOURCEID, URL, NAME ) VALUES (
    63, '<http://www.ncbi.nlm.ni h.gov/entrez/query.fcgi?db=n ucleotide&cmd=s earch&term=>',
    'GenBank' );
  • Alex Filonov

    #2
    Re: Difficulty inserting due to &amp;

    rp_3@yahoo.com (rp_3) wrote in message news:<36bdf685. 0308191313.4b14 414d@posting.go ogle.com>...
    Hello,
    >
    I am attempting to insert the following but am having difficulty with
    the "&" symbol being accepted as a literal character. If I preced the
    "&" with a backslash "\", when I execute via sqlplus, the script waits
    for input, however if I execute via sql window in TOAD, the record is
    inserted as expected.
    >
    Any and all suggestions greatly appreciated,
    Richard
    >
    sourceid = number(18)
    url = varchar2(250)
    name = varchar2(50)
    >
    INSERT INTO SOURCE ( SOURCEID, URL, NAME ) VALUES (
    63, '<http://www.ncbi.nlm.ni h.gov/entrez/query.fcgi?db=n ucleotide&cmd=s earch&term=>',
    'GenBank' );

    Use:
    set scan off
    or
    set define off
    or
    set escape \ on (you need to escape & with a \ in this case)

    Comment

    Working...