Subject AW: AW: [firebird-support] uppercase field name
Author Olaf Kluge
I'm so sorry, I wanted to write "it is indeed, but NOT one of firebird"
Sorry, sorry, sorry!

Thank you for your detailed answer.

Olaf
______________________________

For such an old tool I am not surprised if it doesn't fully support quoting.
Try isql, FlameRobin or some other tool that's more up to date.
Then drop the table with SQL such as this:

drop table "yourlowercasetablename";

It should work. In FlameRobin you could even click on it in the explorer
tree and request it to be deleted.

> Second, the co-worker has accessed the table named with lower cases.
> After I have deletet the record in mon$attachments, I was able to delete
the record.
>
> I'm using the old sql manager since 8 years. Therefore I thought it is
> an problem - it is indeed, but one of firebird. If desired I can make
> a screenshot. EMS/IB knows no tables and fields that are in lower case.

It is not a "problem" of Firebird. This is an ordinary SQL feature. Some
tools may not support it correctly, but that would be a problem with the
tool, not Firebird.

If an identifier is unquoted when it is created, FB will store it in
uppercase. If it is quoted when it is created, FB will store it with the
case as is - no conversion.

When referencing an identifier, the same rules apply: not quoted = FB will
uppercase it/quoted = FB will use it as is.

This means that if an identifier is created with quotes and lowercase, you
cannot access it without quotes, because FB will uppercase the identifier
before trying to find it. This will fail, of course, since it was created in
lowercase. So, when you've created and identifier with quotes in lowercase,
you must always reference it with quotes and lowercase.

This is really very intuitive once you think about it. As a rule of
thumb: if you create it qith quotes, always ref with quotes, and if you
create it qithout quotes, always ref it qithout quotes.

The only "gotcha" is when you create an identifier WITH quotes but in
UPPERCASE. In that case you can ref it without quotes and in any case.
(Assuming it contains plain ASCII chars only).

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



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links