firebird2.5

Can I use the Firebird DateAdd function in the Where clause?

大城市里の小女人 提交于 2020-01-04 05:33:32
问题 In firebird can I use the DateAdd function in the where clause? I have the following sql; select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, 'now') I get error; expression evaluation not supported 回答1: Your third parameter is invalid. select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, current_timestamp) 'now' is a string literal that can only be used together with the date keyword, e.g. date 'now' .

Can I use the Firebird DateAdd function in the Where clause?

你离开我真会死。 提交于 2020-01-04 05:33:10
问题 In firebird can I use the DateAdd function in the where clause? I have the following sql; select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, 'now') I get error; expression evaluation not supported 回答1: Your third parameter is invalid. select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, current_timestamp) 'now' is a string literal that can only be used together with the date keyword, e.g. date 'now' .

Firebird 2.5 CHARACTER SET WIN1252 is not installed

妖精的绣舞 提交于 2019-12-29 07:08:09
问题 I've installed Firebird-Server 2.5 on FreeBsd 9.1 using: pkg install firebird-server-2.5.2_1 It's working ok, since I can connect using FlameRobin from an external PC. Now, when I try to restore a database using gbak, I got this: ... gbak: ERROR: CHARACTER SET WIN1252 is not installed gbak:Exiting before completion due to errors Should I install something more server side?. The database was created on a Windows machine, that's why its character set is WIN1252. EDIT: after some trouble I

How to redirect binary gbak output to a Delphi stream?

前提是你 提交于 2019-12-28 12:44:08
问题 I want the Firebird backup tool gbak to write its output to a Delphi stream (with no intermediate file). There is a command line parameter to write to stdout rather than a file. I then use the Execute method in JEDI's JclSysUtils to launch gbak and process that output. It looks like this: procedure DoBackup; var LBackupAbortFlag: Boolean; LBackupStream: TStringStream; begin LBackupAbortFlag := False; LBackupStream := TStringStream.Create; try Execute('"C:\path to\gbak.exe" -b -t -v -user

Count equal date parts of the timestamp column ACROSS the groups by the said column

筅森魡賤 提交于 2019-12-25 03:06:20
问题 I would like to count duplicate date values. I already know that my field "WHEN" is a timestamp, so I have to cast it to type of date. my actual query looks like this: SELECT u.USERNAME, r."WHEN", r.UPDATEINOUT, case (r.UPDATEINOUT) when 0 then 0 when 1 then 1 else r.INOUT end INOUT FROM ATTENDANT r LEFT JOIN USERS u ON r.USERID = u.ID where u.USERNAME = 'rk' and (r.UPDATEINOUT = 1 or r.UPDATEINOUT = 0 or r.UPDATEINOUT is null) group by r."WHEN", INOUT, u.USERNAME, r.UPDATEINOUT order by r.

How to create an embedded database using Firebird in C#

安稳与你 提交于 2019-12-24 13:14:45
问题 I am trying to setup an embedded database for my c# application. I try many things but cannot get it working. How can I do it? I mean which files to which folder? I have firebirdclient referenced in my program. Could you please write a summary? thanks in advance... 回答1: Ensure that the fbembed.dll is in the same folder as your application source code Add the fbembed.dll to your C Sharp application from the "Add existing item" menu option (if you have not already done so) Set the output

Firebird & Visual Studio 2010 Failed to find Data Provider

只谈情不闲聊 提交于 2019-12-24 11:59:54
问题 I have Windows 7 64bit. I am trying to use Firebird with VS 2010. I get the following error: Failed to find or load the registered .Net Framework Data Provider. I have done the following Installed "NETProvider-2.6.5.msi" Extracted "FirebirdDDEXProvider-2.0.5.zip" I copied the .dll's from the DDEX zip file to the directory C:\Program Files (x86)\FirebirdClient The contents of which are: FirebirdSql.Data.FirebirdClient.dll FirebirdSql.Data.UnitTests.dll FirebirdSql.VisualStudio.DataTools.dll

Error when connecting to Firebird database with NodeJS

Deadly 提交于 2019-12-24 08:17:33
问题 I'm trying to connect to a Firebird database with NodeJS, and I'm using the node-firebird package link here, and am having the following error when trying to connect. Error node index.js Error: Connection is closed. at exports.Connection.Connection._queueEvent (C:\Users\JEFTER\Documents\firebird-node-dev\node_modules\node-firebird\lib\index.js:3117:22) at exports.Connection.Connection.connect (C:\Users\JEFTER\Documents\firebird-node-dev\node_modules\node-firebird\lib\index.js:3152:10) at C:

Error -104 Unexpected end of command creating a Firebird stored procedure

南笙酒味 提交于 2019-12-24 07:47:04
问题 I want to create a stored procedure in Firebird: CREATE PROCEDURE CalcPvIncome ( BeginDate date, EndDate date, KwPrice decimal (2,2) ) RETURNS ( Total_PV_Production decimal (9,2), Total_Income decimal (9,2) ) AS BEGIN FOR SELECT SUM(ENERGY/1000), SUM((ENERGY/1000) * :KwPrice) FROM PVPROD WHERE proddate >= :BeginDate AND proddate <= :Enddate INTO :Total_PV_Production , :Total_Income DO BEGIN SUSPEND ; END END I get this error: Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL

Pivot rows into columns Firebird 2.5

最后都变了- 提交于 2019-12-21 17:39:46
问题 The sequence: table1 ===== id - Description ---------------- |1 |Proj-x |2 |Settlers |3 |Bank |4 |Newiest table2 ===== id table1Id value alternate-value --------------------------------- |1| 1 |12 |null |1| 4 |6 | null |1| null |22 |Desktop |2| 2 |7 |null |2| 3 |11 |null |2| null |2 |Camby Jere |3| 1 |8 |null |3| 4 |6 |null |3| null |7 |Camby Jere The select instruction must return |table1.id|Proj-x|Settlers|Bank |Newiest|Desktop|Camby Jere ----------------------------------------------------