🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.java.databases
2 messages
2 total messages Started by uncle.scrooge Thu, 02 Sep 1999 00:00
ORACLE and QUOTE identifier
#35
Author: uncle.scrooge
Date: Thu, 02 Sep 1999 00:00
33 lines
1952 bytes
I'm using oracle's thin drivers to access an oracle 8.0.5 database. I'm
also jbuilder 2.0.

My problem is that I have legacy schema definitiions in sybase with
lowercase column names.
I want this same definitions to work with oracle. No problem you say?
Oracle is case insensitive you say?

To keep a long story short, this is what's happening:

- give a table such as
    create table foo (X number)

- this insert works
    insert into foo ("X", 100)

- this doesn't
    insert into foo ("x", 100).

With the latter I get the quintissential "invalid column name" problem.
The SQL is generated for me
from all the layers I'm using (jbuilder, jdbc, oracle driver etc).

I can't change my column names easily, since if I do so, the code will
stop working with sybase.

So...
    - At the java driver level, is there a way to set what the "quoted
identifier" character should be? or to tell the database not to use it?
   or..
    - is there way at the server level to make the above 2 inserts
behave the same?
Re: ORACLE and QUOTE identifier
#36
Author: Lee Fesperman
Date: Thu, 02 Sep 1999 00:00
20 lines
1410 bytes
uncle.scrooge wrote:
> My problem is that I have legacy schema definitiions in sybase with
> lowercase column names.
> I want this same definitions to work with oracle. No problem you say?
> Oracle is case insensitive you say?

Oracle *is* case insensitive (as are all standard SQL RDBMSs). One of the purposes of 
quoting an identifier is to require case sensitivity. So, "CapitalIdea!" is distinct 
from "capitalidea!".

If your app says,

  insert into foo ("x", 100)

Try (if you can) defining the table this way...

  create table foo ("x" number)

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads