Subject Re: [firebird-support] Bug? on table naming/calling
Author Helen Borrie
At 10:34 AM 18/09/2003 +0000, you wrote:
>Hello!
>I'm totally a newbie on Firebird so I'm not sure if I'm doing some
>banal miskate or what!
>
>I created a table named "Persone" and I tryed to exec this SQL
>statement:
>"select * from Persone"
>
>but I got the following error:
>
>Dynamic SQL Error
>SQL error code = -204
>Table unknown
>PERSONE
>
>
>if I create the table naming it "PERSONE", the query above works
>properly!

I bet you've reported something wrong here.

If you create the table as "PERSONE" then both of the following will work:

select * from "PERSONE";

select * from PERSONE;

but select * from persone **won't** work.

Reason:

1. Using double-quotes on identifiers makes the identifiers case-sensitive.
2. If you define an object with a double-quoted identifier then you must
always refer to that object using the double quotes.
3. The exception to this rule is where you double-quote an identifier
which was declared in all upper-case. That's the only situation where
omitting the quotes will work.

Solution for a simpler life: don't use quoted identifiers unless you
absolutely must.
(but some C programmers love 'em!) :-))

h.