Board index » delphi » Oracle field name case sensitivity

Oracle field name case sensitivity

Hi,

Any ideas why one has terrific case sensitivity problems with Oracle?

Have a TTable with Fields on it, fieldnames in uppercase. Table name in
uppercase.

Do a CreateTable.

Any queries have to be of syntax SELECT "field1", "field2" from TABLE
because of Delphi creating the fields in lower case.  This is awkward
since with Paradox you cannot do "field1", "field2".

The only workaround I've found so far is to do a SELECT t."field1",
t."field2" FROM TABLE t which works for both.

Ideally I want the 'TURN CAPS ON FOR ORACLE CREATE TABLE' / 'MAINTAIN
THE CASE SENSITIVITY I GIVE YOU'  option....

Any ideas?

Thanks, Dave.

 

Re:Oracle field name case sensitivity


Create the table issuing a CREATE TABLE statement via a TQuery (with
ExecSQL).

Florin.

Re:Oracle field name case sensitivity


Oracle's field names, table names, etc ARE case sensitive. However, Oracle
will automatically capitalize any name that is not in quotes. For example
MyField will be converted to MYFIELD, but "MyField" will still be MyField.
Now to complicate things even more, the BDE will automatically add quotes
to (all?) live SQL requests, but not non-live (e.g. pass through) requests.

I hope this helps!

- John
jsantm...@Wellsoft.com

Quote
David Pilcher wrote:
> Hi,

> Any ideas why one has terrific case sensitivity problems with Oracle?

> Have a TTable with Fields on it, fieldnames in uppercase. Table name in
> uppercase.

> Do a CreateTable.

> Any queries have to be of syntax SELECT "field1", "field2" from TABLE
> because of Delphi creating the fields in lower case.  This is awkward
> since with Paradox you cannot do "field1", "field2".

> The only workaround I've found so far is to do a SELECT t."field1",
> t."field2" FROM TABLE t which works for both.

> Ideally I want the 'TURN CAPS ON FOR ORACLE CREATE TABLE' / 'MAINTAIN
> THE CASE SENSITIVITY I GIVE YOU'  option....

> Any ideas?

> Thanks, Dave.

Re:Oracle field name case sensitivity


Hi
Thanks for replies... it was a umm, well to err is human!... out of all my
TTables I was creating, 1 had it's field names in lower case... it was just
doing what I asked!

Now... if only someone would come up with a generic outer join statement that
works in Oracle, Paradox, SQLServer, Access.... (+) OUTER JOIN etc...

Dave

Quote
John Santmann wrote:
> Oracle's field names, table names, etc ARE case sensitive. However, Oracle
> will automatically capitalize any name that is not in quotes. For example
> MyField will be converted to MYFIELD, but "MyField" will still be MyField.
> Now to complicate things even more, the BDE will automatically add quotes
> to (all?) live SQL requests, but not non-live (e.g. pass through) requests.

> I hope this helps!

> - John
> jsantm...@Wellsoft.com

> David Pilcher wrote:

> > Hi,

> > Any ideas why one has terrific case sensitivity problems with Oracle?

> > Have a TTable with Fields on it, fieldnames in uppercase. Table name in
> > uppercase.

> > Do a CreateTable.

> > Any queries have to be of syntax SELECT "field1", "field2" from TABLE
> > because of Delphi creating the fields in lower case.  This is awkward
> > since with Paradox you cannot do "field1", "field2".

> > The only workaround I've found so far is to do a SELECT t."field1",
> > t."field2" FROM TABLE t which works for both.

> > Ideally I want the 'TURN CAPS ON FOR ORACLE CREATE TABLE' / 'MAINTAIN
> > THE CASE SENSITIVITY I GIVE YOU'  option....

> > Any ideas?

> > Thanks, Dave.

Other Threads