Subject | Re: [firebird-support] problem with column names starting with number character |
---|---|
Author | Thomas Steinmaurer |
Post date | 2010-10-08T19:40:52Z |
Hi Daniel,
select tb."6mes", tb."12mes" from biz_table tb;
Be aware, when accessing database objects with double quotes, names are
case-sensitive.
HTH.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/
> I'm facing a problem creating a SQL to retrieve data from a table.In a dialect 3 database enclose the column names with double quotes. Try:
>
> 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?
select tb."6mes", tb."12mes" from biz_table tb;
Be aware, when accessing database objects with double quotes, names are
case-sensitive.
HTH.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/