Subject Re: [firebird-support] problem with column names starting with number character
Author Thomas Steinmaurer
Hi Daniel,

> I'm facing a problem creating a SQL to retrieve data from a table.
> the table has two columns starting with number in the name the two columns are: 6mes, 12mes.
> Then when I try to execute the folowwing SQL:
> SELECT tb.6mes,tb.12mes from biz_table tb;
> it gives me the following error:
> GDS Exception. 335544569. Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 1, column 10
> .6
> How can I build this SQL, in order to get these data?

In a dialect 3 database enclose the column names with double quotes. Try:

select tb."6mes", tb."12mes" from biz_table tb;

Be aware, when accessing database objects with double quotes, names are


Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
My blog: