Subject Re: [firebird-support] No case sensitive column names
Author Kjell Rilbe
kokok_kokok wrote:

> Is there a way to store the case of the column names but then to get
> them without case sensitive feature?
>
> For example, I have the "EnterDate" column in a table.
>
> If I do "select * from Customers" or I use a report designer, I would
> like to see the column name as "EnterDate", not "ENTERDATE". (Firebird
> store all column names in upper case if you do not provide "")
>
> I know that I can use the "" in Firebird to keep the case, but then,
> the column is case sensitive.
>
> I would like to store the column name as EnterDate, but then I would
> need to use EnterDate or ENTERDATE or ENTERDate in the Select or Where
> clause.
>
> Do you know a way to do it?

Can't be done as far as I know.

If you use "" when creating the identifier, FB stores it as is, with
exact case. If you don't use "", FB converts to uppercase and (as far as
I know) checks for ASCII-only characters.

When referencing identifiers, FB does the same: With "" use them as is,
and use that to lookup the identifier in the system tables. Without ""
convert to uppercase and use that to lookup the identifier in the system
tables.

FB *could* have been designed to instead do a case insensitive lookup
for unquoted identifiers, but always store the names as specified on
creation. I suppose that would have solved your problem. But that's not
how FB is implemented.

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64