Subject | AW: [firebird-support] uppercase field name |
---|---|
Author | Olaf Kluge |
Post date | 2011-05-10T09:37:26Z |
Hello Mark,
first, thank you for your response.
The problem arises with the old ems/ib manager from the year 2004. Neither
with or without quotes the old manager knows no fields and table names with
small letters. The manager recognizes automatically a table name and the
quotes not needed. The same with UDFs. How I wrote, with another manager
(ibexpert) there are no problems at all.
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.
Thank you for your friendly help.
first, thank you for your response.
The problem arises with the old ems/ib manager from the year 2004. Neither
with or without quotes the old manager knows no fields and table names with
small letters. The manager recognizes automatically a table name and the
quotes not needed. The same with UDFs. How I wrote, with another manager
(ibexpert) there are no problems at all.
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.
Thank you for your friendly help.
On 10-5-2011 9:17, Olaf Kluge wrote:
> my co-worker has created a new table, unfortunately he named the
> fields with lower case. Now, I can not read the columns with a
> sql-query and not delete the table too.
Your co-worker quoted the identifiers, which means that select ... from
tablename won't work, while select ... from "tablename" will work. This is
basic and documented Firebird behavior
> How it Is ab problem If I named the tablefields in lowercase? I knew
> the problem and have named the fields in upper case all the time and
> with older versions of firebird.
First it isn't a problem. If an identifier is quoted during creation it is
case-sensitive. Unquoted identifiers are technically case-insensitive, but
treated as though they are uppercase. so an identifier tablename does not
match "tablename".
> How can I delete this table, especially the primary key? Currently I
> get the error message "object index is in use" by deleting the field
> with primary key and "object tablename is in use" by deleting the entire
table.
Quote the identifier in your statements.
Mark
--
Mark Rotteveel
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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