Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    19

    Unanswered: using concat with escape characters

    Hi ,
    I am trying to set a variable in stored procedure. I need to have

    set i_str1 = " ' " || i _str1 || " ' ";

    is there any way i can use escape characters to change the real meaning of single quotes ....


    please help

    thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: using concat with escape characters

    Originally posted by venkat_dba
    Hi ,
    I am trying to set a variable in stored procedure. I need to have

    set i_str1 = " ' " || i _str1 || " ' ";

    is there any way i can use escape characters to change the real meaning of single quotes ....


    Single quotes are escaped by doubling them (repeating two times). E.g., your expression should look like this:
    PHP Code:
    set i_str1 ''''  || i _str1 || ''''
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Dec 2003
    Posts
    19

    Re: using concat with escape characters

    thanks n_i , it worked great.

    Originally posted by n_i
    Single quotes are escaped by doubling them (repeating two times). E.g., your expression should look like this:
    PHP Code:
    set i_str1 ''''  || i _str1 || ''''

Posting Permissions

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