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: Case-Sensitivity of Identifier Names

Re: Case-Sensitivity of Identifier Names

From: Anton Buijs <aammbuijs_at_xs4all.nl>
Date: Thu, 11 Jul 2002 22:10:51 +0200
Message-ID: <agkom7$qtc$1@news1.xs4all.nl>


That's your penalty for using Microsoft stuff against the Oracle database. The first time I saw a lower case table name in a query from dba_objects I did not know what I saw.
Took some time before I found to enclose it in double quotes to be able to select from it.
Lower case names just happen with these tools. Maybe just a rename table to all uppercase names is the solution for you? Or the other way around: create the table with column names and table names enclosed in double quotes to create them in the case you want: CREATE TABLE "table_name" ( "column_name" NUMBER );

Piotr Jozwiak <pjozwiak_at_poczta.onet.pl> schreef in berichtnieuws agjdcl$1j4$1_at_news.onet.pl...
| When a query is executed, the Oracle database server converts all database
| object names to uppercase characters.
| Server does not convert to uppercase letters an object name that is
enclosed
| in double quotation marks.
|
| Normally I do not use double quotation marks.
| However, I have an application designed from Microsoft SQL Server with
lots
| of 'quotation marks constructions' generated automatically by Visual
Studio.
| My application uses ODBC, so it can connect to Oracle server.
| That's why, I want to find a way to make my example correct, without
having
| to change it.
|
| Piotr Jozwiak
|
| "Jim Lyons" <jlyons_at_weblyons.com> wrote in message
| news:e67857c9.0207101328.766b8d95_at_posting.google.com...
| > "Piotr Jozwiak" <pjozwiak_at_poczta.onet.pl> wrote in message
| news:<aghr0p$qo2$1_at_kujawiak.man.lodz.pl>...
| > > The names of database objects - tables, views, columns, and synonyms -
| are
| > > case-sensitive by default in the Oracle database server.
| > > How to make them case-insensitive?
| > >
| > > Example:
| > >
| > > CREATE TABLE TABLE_NAME ( COLUMN_NAME NUMBER );
| > > SELECT "column_name" FROM "table_name";
| > >
| > > The select does not work because of case-sensitivity of identifier
| names.
| >
| > Lose the double quotes.
| >
| > Identifiers are case insensitive by default in Oracle. You only need to
| be
| > concerned with case when dealing with literal strings.
| >
| > For example:
| >
| > select table_name from user_tables
| >
| > is perfectly fine.
| >
| > select table_name from user_tab_columns where column_name = 'id'
| >
| > won't get you anything but
| >
| > select table_name from user_tab_columns where column_name = 'ID'
| >
| > will.
| >
| > -----
| > Jim Lyons
| > DBA
| > UT Austin
|
|
|
|
Received on Thu Jul 11 2002 - 15:10:51 CDT

Original text of this message

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