Hi, I’m not sure I put the right title since I’m not a programmer. Sorry for that.
In Libreoffice Base 6.4 HSQLDB 1.8, this query works well:
SELECT "ID", "DeviceName", :InputYear - Year("PurchaseDate") as "DeviceAge" From Table1
So, I am using parameter query :InputYear
to calculate “Device Age” in a query. This is useful to calculate yearly depreciation value of my equipments.
In Libreoffice Base 6.4 Firebird 3.0, I’ve made small adjustment:
SELECT "ID", "DeviceName", :InputYear - Extract (Year from "PurchaseDate") as "DeviceAge" From Table1
but did not work. The error message is: Firebird_sdbc error, SQL error code = -804, Data type unknown
What went wrong?