Inserting special character
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Inserting special character

Hybrid View

  1. #1
    Join Date
    Sep 2000
    Posts
    41
    Hello,
    I have a table say TAB1. It has one field
    f1 VARCHAR2(10)

    I want to do something like

    insert into TAB1 values('a&b');

    where that '&' needs to go in as a string.

    When I run thisd statement in SQL*Plus it is asking for the value of 'b'.

    I want the '&' to be treated as a normal string instead of a special character. How do I do this.

    I tried with

    insert into TAB1 values('a\&b');

    But it did not work......

    Please help


    Thank you

  2. #2
    Join Date
    Feb 2001
    Location
    Kolkata- India
    Posts
    356
    Hi!
    Try
    SQL> set escape '\'
    SQL> insert into TAB1 values('a\&b');

    It will work

    There Nothing You cannot Do, The problem is HOW.

  3. #3
    Join Date
    Sep 2000
    Posts
    41
    Hi Sudip,
    Yes...it did work !!!!

    Thanks a lot for your help.

  4. #4
    Join Date
    May 2001
    Location
    Delhi
    Posts
    340

    Special Char

    Mr. Ghosh,

    It is ok. u can keep on posting such kind of uestions. it hekps starters like us ;-)
    --------------------------
    The Time has come ....

  5. #5
    Join Date
    Feb 2001
    Location
    Kolkata- India
    Posts
    356

    Thumbs up Re: Special Char

    Originally posted by vijay8282
    Mr. Ghosh,

    It is ok. u can keep on posting such kind of uestions. it hekps starters like us ;-)
    We all have something or the other to learn here.
    There Nothing You cannot Do, The problem is HOW.

Posting Permissions

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


Click Here to Expand Forum to Full Width