Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    25

    Unanswered: Insert string with comma in value

    I am trying to execute the sql below it inserts however it does not escape the comma correctly. val2 is a varchar2(50)

    insert into tablename(val1, val2)
    values ('A','String1,String2');

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    What do you mean with "does not escape the comma correct"

    What are you excpecting?
    Do you get an error message?
    Is there wrong data in the database? If yes, how did you check that?

  3. #3
    Join Date
    Feb 2009
    Posts
    25
    Ok I found the problem I was copying the value from my html based email and the first string had a - in it something like below however I found out the difference after I pasted the value (-) in a textpad that dash was actually showing as a black block when I deleted the dash and typed it in it took the value well.aaahhhh thanks anyways!!!

    insert into tablename(val1, val2)
    values ('A','String-1,String2');

Posting Permissions

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