Women in Technology

Hear us Roar



Article:
  Ruby/Tk Primer: Creating a cron GUI Interface with Ruby/Tk
Subject:   About String
Date:   2006-01-23 21:18:01
From:   shymol
I am using Oracle database,using this data base one problem is occuring
i gave a string as like
String="shy's";
the database is not taking this single quotation,if ant method is there means please send the program.
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • About String
    2006-01-23 23:46:21  Christopher Roach | O'Reilly Blogger [View]

    Ok, it's been quite a while since I've done any SQL, but if I remember correctly, the problem you're running into has to do with SQL's use of the single quote ('). In this case I believe the database assumes that the single quote (or, aposrophe) you have in your statement "shy's" is a delimiter. I think you can can make the DB treat it as part of the string by replacing the single quote with two single quotes. So, instead of "shy's", try "shy''s" (two single quotes, not a double quote). If that doesn't work, then you may have to take a look at the documentation for Oracle to see how you tell the DB that the single quote is not a delimiter, but part of the string instead.

    Hope that helps you out.

    Christopher