Subject Re: [IB-Conversions] Using key words as column names
Author Helen Borrie
At 03:15 PM 27/06/2005 +0000, you wrote:
>How can I use the key word "TYPE" as a table column name?
>
>Currently there is an applicaiton that is using a MSSQL DB. Some tables
>have the keyword "TYPE" as a column name. We are trying to migrate to
>Firebird and having no luck.
>
>I can create the tables but have issues when trying to query them.

Because TYPE is a reserved word, it must be defined in double-quotes to be
allowed. That also makes it case-sensitive.

>In
>my query statements I do not encapsulate the column names with quotes.
>So a statement like this will not work:
>
>SELECT TYPE FROM TEMPLATES

Once it has been defined in double quotes it has to be queried in
double-quotes and correct case also.

SELECT "TYPE" FROM TEMPLATES


>Although, when using a dialect 3 with firebird alpha 2 it will work.

It will "work" without quotes in some circumstances, provided the quoted
identifier was defined in upper case. However, it won't work without the
quotes in DML queries. In alpha 2., it was made into a non-reserved word.

Helen