Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: HELP! QUOTED identifiers

Re: HELP! QUOTED identifiers

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Sun, 05 Sep 1999 12:41:40 -0700
Message-ID: <37D2C774.862360F6@rationalconcepts.com>


Hi,
  Ok

  1. How did you get this statement to work? create table FOO(X varchar2)
  2. How would this statement work if in fact #1 worked? insert into FOO ("X",100)?

  In #1, you didn't supply the size of the varchar2.   In #2, you are trying to insert two columns into a table that in theory is defined as only having one...
and you are missing a keyword.

To escape a single quote on the fly, you replace the single quote with two single quotes, not a
double quote.

i.e. to insert the string "Isn't this nice...",

    insert into foo values ('Isn''t this nice...'); Note that strings in oracle are delimited by single quotes. Your string in java is delimited by
double quotes...

Please read your sql documents for details on sql commands.

Regards,
Cindy

"uncle.scrooge" wrote:

> is there a way to set an oracle server so that both of these statements
> work?
>
> insert into FOO ("X",100)
> insert into FOO ("x",100)
>
> if the table is defined as "create table FOO(X varchar2)" ?
>
> The second statement gives an "invalid column name" error.
>
> I'm wrestling a very large jdbc bear, and I'm looking for server side
> solutions.
>
> I need to either disable quoted identifiers (so that the quoted
> character is not "), or find a magical
> setting client or server side that will do this.
>
> Oracle 8.0.4 on HP. Client on NT 4.0. Using thin driver.
Received on Sun Sep 05 1999 - 14:41:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US