Results 1 to 2 of 2
Nov 25, 2009, 17:09 #1
- Join Date
- May 2004
- Ottawa, Canada
- 0 Post(s)
- 0 Thread(s)
Using Reserved Word TimeStamp as a field name (Firebird 2.5)
Am extending the data layer of an existing application to work with FireBird 2.5, in addition to MSSQL and SQLite, but have hit a stumbling block.
I have a field called TimeStamp which stores the data/time as type TimeStamp. This works fine under MSSQL and SQLite where the type is datetime, but falls over under Firebird. The following SQL:
SELECT SysTrnId,'TimeStamp' from "TRANSACTIONS"
Is it possible to do this under FireBird, or am I going to have to rename the field and change the code in the other data layers.
Nov 25, 2009, 21:08 #2
- Join Date
- Jul 2002
- Toronto, Canada
- 52 Post(s)
- 2 Thread(s)
i don't do firebird, but if you can use doublequotes around the tablename (which is standard SQL), then you can do the same around column names
SELECT SysTrnId, "TimeStamp" from "TRANSACTIONS"
the only problem, of course, is that this won't run in all databases
the ~best~ strategy is not to use a column or table name that might be a reserved word in ~any~ database system
so yeah, i think this would be a good time to rename your columns