firebird

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 ibase_restore working with php?

烈酒焚心 提交于 2019-12-25 02:06:26
问题 I'm trying to restore a Firebird database using ibase_restore, and I get nothing. I found no documentation on the internet. I need help! This is the code I used, with the gbak command from console I have restored it perfectly. $servidor = 'localhost'; $usuario = 'sysdba'; $password = '*******'; if (($service = ibase_service_attach($servidor, $usuario, $password)) !== FALSE) { $result = ibase_restore($service, '/folder/BACKUP.FBK', $servidor.':/folder/RESTORE.FDB'); var_dump($result); ibase

firebird procedure to mysql

与世无争的帅哥 提交于 2019-12-24 23:14:23
问题 I have trouble converting a stored procedure from Firebird to MySQL. Here is my existing code from Firebird: CREATE OR ALTER PROCEDURE GET_EOMONTH ( selectmonth integer, selectyear integer) returns ( lastdate timestamp) as declare variable vmonth integer; declare variable vyear integer; begin VMONTH = selectmonth+1; VYEAR = selectyear; if (VMONTH=13) then BEGIN vmonth = 1; vyear = selectyear + 1; END LASTDATE = CAST(VMONTH || '/1/' || VYEAR AS DATE) - 1; /* Procedure Text */ suspend; end^

Ruby Timeout not timing out

拈花ヽ惹草 提交于 2019-12-24 20:12:05
问题 I'm using a firebird database gem to connect to a user specified database. It works fine as long as user provides correct data. If not, gem cannot connect, and it takes a very long time before gem throws an exception. I've tried to use Timeout:timeout like this: database = Fb:Database(connection_data) Timeout::timeout(5) do database.connect #that's the part that takes long to connect end But it does not time out. It simply waits (and it is a long wait, more than a minute), and throws gem

Problem injecting a VB parameter into a stored procedure (FireBird)

风流意气都作罢 提交于 2019-12-24 15:33:01
问题 Everyone here has always been such great help, either directly or indirectly. And it is with grand hope that this, yet again, rings true. For clarification sakes, the Stored Procedure is running under FireBird and the VB is of the .NET variety I have a stored procedure (excerpt below, important bit is the WHERE) select pn, pnm.description, si_number, entry_date, cmp_auto_key, parts_flat_price, labor_flat_price, misc_flat_price, woo_auto_key, wwt_auto_key from parts_master pnm, wo_operation

On duplicate key gives Invalid token

一笑奈何 提交于 2019-12-24 15:13:03
问题 I am trying to update name_code from employee_migration by numbers from cdclient from table clientref . INSERT INTO employee_migration (name_code) Select cl.cdclient From clientref cl Inner Join employee_migration em ON cl.client like upper(em.name) ON DUPLICATE KEY UPDATE name_code VALUES (cl.cdclient) I get this error: Invalid token. Dynamic SQL Error. SQL error code = -104. Token unknown - line 3, column 1. ON. 回答1: If you use Firebird server (which was not said, but which looks like by

How to set initial generator value?

随声附和 提交于 2019-12-24 14:33:14
问题 I need to initialise a new Firebird generator / sequence to the max primary key value of an existing, 'old' table. I tried the following but it is not working, I get the error "Token unknown - line 6, column 8 select". I cannot do this manually as it must be executed on many different DBs. I am using Firebird 2.5.1. According to http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-execblock.html this should work - what am I doing wrong? set term

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

SSRS and Firebird Database (ODBC Connection issues in Report Manager)

雨燕双飞 提交于 2019-12-24 12:11:57
问题 I have a Windows 7 OS (64-bit). I have data coming from Firebird database, and reports in Microsoft SSRS. I am able to write queries and successfully retrieve data in the BIDS (SSRS 2008), as well as in SSDT (SSRS 2012). However, when I deploy the reports in Report Manager in the IE browser, I get these 2 errors: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (this is when I use the ODBC Connection as a User DSN) (or) ERROR [IM014]

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