firebird

Update a table with join?

坚强是说给别人听的谎言 提交于 2019-12-17 13:25:30
问题 I am trying to update table A with data from table B. I thought I can do something like this update A set A.DISCOUNT = 3 from INVOICE_ITEMS A join ITEM_PRICE_QUNTITY B on A.ITEM_PRICE_NO = B.ID where A.INVOICE_ID = 33 but getting error SQL Message : -104 Invalid token can anyone help me? 回答1: It is not possible to do this with a JOIN . The Firebird UPDATE statement has no FROM clause. The syntax is: UPDATE {tablename | viewname} [[AS] alias] SET col = newval [, col = newval ...] [WHERE

GDS Exception. 335544421. connection rejected by remote interface

流过昼夜 提交于 2019-12-17 10:03:26
问题 I am trying to connect to a firebird db using the jaybird jdbc driver. Firebird is running under ubuntu. I have created a simple database located under /tmp/hellofb.fdb (yeah not the best place, just for testing). I am running firebird superserver 3.0. The firebird service is up and running sudo service firbird3.0 status : firebird3.0.service - Firebird Database Server ( SuperServer ) Loaded: loaded (/lib/systemd/system/firebird3.0.service; enabled; vendor preset: enabled) Active: active

Filter sql based on C# List instead of a filter table

大城市里の小女人 提交于 2019-12-17 09:59:15
问题 Say I have a table with the following data: Now I want to filter by the primary keys department and number. I have a list of department and number combinations that have to be filtered in code. In my mind, I would create a join that results in the following: select * from employee e inner join dynamicTable dyn on e.Department = dyn.Department and e.Number = dyn.Number; dynamicTable is my List in C# code that has the primary keys to filter, but I don't know how to pass this list to the

Firebird BLR 623 invalid request - LRTRIM is not defined - module name or entrypoint could not be found

柔情痞子 提交于 2019-12-14 03:17:48
问题 I work in Firebird 2.5 database: Occasionally (not always) I get the following error when I run some stored procedures or views (database objects) that use the LRTRIM function: Invalid token. invalid request BLR at offset 623 function LRTRIM is not defined module name or entrypoint could not be found Error while parsing procedure XXXXXXX (stored_procedure name) ; (I get this both in IB Expert and SSRS) This said I am able to access other database objects that do not use LRTRIM function! I had

Granting SELECT on all tables to a user in Firebird 2.1

折月煮酒 提交于 2019-12-14 03:08:42
问题 I've added a user to a Firebird 2.1 instance using gsec , but now I wanted to grant SELECT on all tables to this new user. I could find how to grant this permission on specific tables, but not to them all: GRANT SELECT ON TABLE table TO USER user; If I try to use the new user I get the following error on isql: no permission for read/select access to TABLE table Is there a way to do that on Firebird 2.1? 回答1: Something like this: EXECUTE BLOCK AS DECLARE VARIABLE tablename VARCHAR(32); BEGIN

firebird - codeigniter connection

断了今生、忘了曾经 提交于 2019-12-14 02:44:06
问题 i just moved my project from my laptop to the local server, which is Linux Fedora. my project was working fine when i run it on my laptop but when i moved it to the local server it gave me this error. Unable to connect to your database server using the provided settings. Filename: core/Loader.php Line Number: 338 i tried using native php ibase_connect and it's throwing this error Unable to complete network request to host "192.168.4.141". Failed to establish a connection. in /var/www/html

Firebird Select Field From Table where Field = current_date

拈花ヽ惹草 提交于 2019-12-13 18:47:12
问题 I have a simply but fror me unsolveable question I have this request: Firebird Select Field From Table where Field = current_date The problem is that this field is a text field an holds date in this format: 25.04.2014 How can i convert it that this questions works if it is the current date. 回答1: SELECT fields FROM table WHERE field= substring(100+extract(day from current_date) from 2 for 2) || '.' || substring(100+extract(month from current_date) from 2 for 2) || '.' || extract(year from

Updating selected rows in Firebird

喜夏-厌秋 提交于 2019-12-13 17:56:14
问题 I want to modify my query. Right now it looks like this SELECT EW_POLYLINE.P0_X, EW_POLYLINE.P0_Y, EW_POLYLINE.ID, EW_POLYLINE.STAN_ZMIANY, a.IDE, EW_POLYLINE.ID_WARSTWY FROM EW_POLYLINE LEFT JOIN ( SELECT EW_OBIEKTY.STATUS , EW_OB_ELEMENTY.IDE , EW_OB_ELEMENTY.TYP FROM EW_OBIEKTY INNER JOIN EW_OB_ELEMENTY ON EW_OBIEKTY.UID = EW_OB_ELEMENTY.UIDO WHERE EW_OBIEKTY.STATUS = 0 AND EW_OB_ELEMENTY.TYP <> 1 ) as a ON EW_POLYLINE.ID = a.IDE WHERE EW_POLYLINE.STAN_ZMIANY = 0 AND a.IDE Is Null Right

Firebird remote backup

拟墨画扇 提交于 2019-12-13 15:52:51
问题 I want to backup a firebird database. I am using gbak.exe utility. It works fine. But, when i want to do a backup from a remote computer, the backup file is stored on the serveur file system. Is there a way to force gbak utility to download backup file ? Thanks 回答1: Backup is stored on the Firebird Server gbak -b -service remote_fb_ip:service_mgr absolute_path_to_db_file absolute_path_to_backupfile -user SYSDBA -pass masterkey Backup is stored on the local machine gbak -b remote_fb_ip

Select from execute block?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 15:02:21
问题 Is is possible to select from execute block result? I want to perform some operation (sum etc..) from it. select t1.* from ( execute block returns ( OUT_VALUE integer ) as begin ... suspend; end ) t1 or with t1 as ( execute block ... ) select * from t1 order by t1.sort_column Neither does not work. Anyone has an advice? Thanks! 回答1: You should create an independent stored procedure like create procedure proc1 returns ( OUT_VALUE integer ) as begin ... suspend; end and then select on this proc