Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
31 views

Set generator to value of another generator

I want to set the value of the generator Dest to the actual value of generator Src: ALTER SEQUENCE Dest RESTART WITH GEN_ID(Src, 0); This doesn't work: Invalid token. Dynamic SQL Error. SQL error ...
TomCat500's user avatar
  • 174
0 votes
0 answers
64 views

Firebird Server Installed but no Firebird Service

I downloaded Firebird 2.1.7 tar file. Installed with install.sh. I can connect to the db at /opt/firebird/bin/isql, but how do I set it up as a service? There is no Firebird service and no instruction ...
Tony 's user avatar
  • 118
0 votes
1 answer
49 views

Why can't Firebird 3 perform where in?

When the code below is executed, it keeps thinking forever and ends up crashing fastreport, why? SELECT TREQDEVMAT.COD_PRODUTO, TPRODUTO.DES_PRODUTO, TPRODUTO.COD_SUBFAMILIA, ...
buzinaro's user avatar
0 votes
0 answers
64 views

How to move numbers on a number line?

I have a Firebird 3 table like this: MyTable ------- ID: Integer (auto inc), primary key Pos: Integer, Unique Flavor: varchar Data looks like: Pos Flavor ------------- 1 Chocolate 2 Vanilla 3 ...
TomCat500's user avatar
  • 174
2 votes
1 answer
115 views

Firebird ODBC Driver not load UDF dll

My DB have a lot of procedures that uses functions from rfunc.dll, but when I try to uses ODBC Driver connection on C# the UDF functions doesn't load Here how I'm doing the connection public ...
Gabriel Jappe Lorenzeti's user avatar
2 votes
1 answer
92 views

Which constraint is checked first - primary key or unique key (on different columns)?

I have a program that synchronizes records in two databases. It relies on primary key violation on insert to know that record already exists, and then it makes applies an update to that record. That ...
Stan's user avatar
  • 23
0 votes
0 answers
117 views

Firebird Database: SELECT on OCTET versus CHAR

My platform: Server Name: localhost/3050 Server Version: WI-V3.0.7.33374 Firebird 3.0 Server Implementation: Firebird/Windows/AMD/Intel/x64 Service Version: 2 I have been told that record ...
K. Morris's user avatar
1 vote
1 answer
499 views

Cannot open gbk file - is it Firebird or Interbase?

We have a .gbk file that we are trying to restore to a database, in order to convert it to Postgres, but we can’t figure out the ODS or even if it is actually an Interbase file, and not a Firebird ...
Nils Nielsen's user avatar
1 vote
1 answer
80 views

Count distinct records in Firebird 3.0

I have data as follows: nota | produto | descricao | vendida | total | ... 1 A AAA 100 1000 1 B BBB 20 200 1 A AAA ...
Roberto Henrique's user avatar
0 votes
1 answer
173 views

Python Firebird driver raise "Not a Directory" exception by connecting to or creation a database

I'm writing a Python3 script under Ubuntu 22.04.3 LTS to work with Firebird database under the Firebird3.0 server. I use the firebird.driver library. But I'm constantly getting an error "Not a ...
izyakantorovich's user avatar
1 vote
1 answer
573 views

How to restore a Firebird 4 backup to Firebird 3 [closed]

I'm looking to migrate from Firebird 3 to 4, but in case it is needed I want to know if and how I can downgrade a database back to Firebird 3. For testing purposes I have a database running under the ...
rando5908452's user avatar
0 votes
1 answer
69 views

Yii2 returns Firebird 3.0 dialect 1 numeric(15,2) field as string with constant junk value (24833794986.24 or 4039119896.80)

I am using Yii2 PHP framework to access Firebird 3.0 database which, unfortunately, is still in dialect 1. I have lot of numeric(15,2) fields in it. That is quite natural approach to store monetary ...
TomR's user avatar
  • 3,016
0 votes
1 answer
84 views

Update multiple rows in single select

I'm getting multiple rows in single select error with this SQL: UPDATE ITEMS IT SET IT.BCOST = (SELECT V.PRICE + (V.PRICE * 0.1) FROM VENDOR V WHERE V.ITEMNO = IT....
Henry Olive's user avatar
0 votes
0 answers
39 views

Update all records of a table according to a view result

I have a view like below ITEMNO INCOME OUTGO AA 10 2 BB 15 0 ... so on I'd like to update every record of the ITEMS table (item cards) according to above view's results. I ...
Henry Olive's user avatar
0 votes
1 answer
63 views

How many days from first day of the current year till today

I'm trying to get day count of from the first day of the current year till today For example: Today = 24/07/2023 FirstDate = 01/01/2023 LastDate = 24/07/2023 The result is 204 days Is it possible to ...
Henry Olive's user avatar
1 vote
1 answer
47 views

Why does my query return null when subquery condition is false

I have these three tables in my Firebird database: CREATE TABLE CLIENT_CODE_MASTER ( ID INTEGER GENERATED ALWAYS AS IDENTITY NOT NULL PRIMARY KEY, CLIENT_CODE VARCHAR(100) UNIQUE NOT NULL, ...
Prabal Kajla's user avatar
0 votes
1 answer
1k views

Connection timeout in Firebird Server 3

I'm connecting to a Firebird SQL Server version 3 with a C# application using Firebird .NET Client 9.1.1. Once the application is started 3 connections to the server are established using a connection ...
anli's user avatar
  • 705
-1 votes
1 answer
68 views

How to return the first row after group by?

My table looks like the following: ID ITEMNO LOCATIONNO LOTNO INCOME OUTGO 1 AAA A-01 001 1 0 2 AAA A-02 002 1 0 3 AAA A-01 001 0 1 When a user sells an item, I want to show the oldest income ...
Henry Olive's user avatar
-1 votes
1 answer
63 views

Case when doesn't accept BEGIN

Case doesn't accept Begin I need to update 2 separate fields in one case, something like below UPDATE PYR SET MSR = Case When MSR = :WRKH then Begin MSR = NULL ...
Henry Olive's user avatar
2 votes
1 answer
85 views

What is the purpose of the '.' operator in a firebird database query?

When I am executing the SQL query below against A Firebird database (version 3.0.9) running on a Windows 10 64 bit PC. SELECT * FROM AliasName WHERE AliasId=3. or 1=1-- I expected the query to fail ...
mjk6035's user avatar
  • 121
-4 votes
1 answer
76 views

Creating a quarterly report in SQL

I'm creating a quarterly report of item usage in Firebird, and got stuck at this point: The select below is working, but it brings me the monthly usage of last 3 months like the image below: Script: ...
Guilherme borges's user avatar
0 votes
1 answer
831 views

Power BI Dataset can not find Firebird database

After a Firebird 3.0 update, our PowerBI Dataset can't find the Firebird database, although the ODBC Setup works just fine. But the most bizarre part, I can create a new Dataflow-set with the exact ...
SCTHOLD's user avatar
  • 11
1 vote
2 answers
72 views

Count days since 3rd event from today

I have a table Events in LibreOffice Base with a Firebird database (version 3.0.8) that records how many times an event occurs. Example below: Date EventCount 22-04-01 15 22-09-30 10 22-10-01 1 ...
hiigaran's user avatar
  • 267
1 vote
2 answers
208 views

Differences in "procedure locking" based on the way the client is connecting to the database

I have created a test procedure like that: CREATE OR ALTER PROCEDURE tmp_fab RETURNS (dummy INTEGER) AS BEGIN dummy = 1; suspend; END Then a first client ("client A") uses the ...
Fabrizio's user avatar
  • 8,023
1 vote
1 answer
1k views

How to get the max value of 3 fields

I have a table with integer fields like this: Field1 Field2 Field3 6 1 2 3 6 2 7 4 2 5 6 1 1 6 2 5 7 1 First, I want to look for the max value in field3. It's 2. Now, I want to look for the ...
TomCat500's user avatar
  • 174
1 vote
1 answer
244 views

How to check if running in autonomous transaction?

In a trigger, I need to do some stuffs only when the code is not running from autonomous transaction. Is there a way to detect if the code is running in the context of an autonomous transaction?
Fabrizio's user avatar
  • 8,023
2 votes
1 answer
711 views

Can't connect to Firebird 3.0 with user with small letters in login with Java

I connect with names in capital letters, but it does not want to connect with small letters in the login. Here is a small test String ENCODING = "WIN1251"; String CONNECTION_URL = "jdbc:...
Алексей Самойленко's user avatar
0 votes
1 answer
1k views

Firebird Server 3.0 not run automatically after installation

I have used Firebird setup 3.0 (Firebird-3.0.10.33601_0_Win32.exe) witch the parameters: Firebird-3.0.10.33601_0_Win32.exe /SILENT /NORESTART /COMPONENTS="ServerComponent,ServerComponent\...
sed47's user avatar
  • 41
0 votes
0 answers
465 views

Firebird dump tables

I have a database.gdb running with Firebird 3.0. This database has two tables: Table1 and Table2. Every day I add records to these tables and when I have finished my work I need to export the two ...
IronButterfly's user avatar
0 votes
1 answer
546 views

Commit/Rollback transaction not listed in MON$TRANSACTIONS

We have a strange issue in a customer's Firebird database. We noticed an active transaction not listed in the mon$transactions table. According to the gstat utility, transaction 231.768.260 is active: ...
TiagoTecchio's user avatar
0 votes
1 answer
207 views

Get value from Firebird cursor by field name

I need get data from cursor by field name, stored in var. For example, I have statement: for select CUBE1, CUBE2, CUBE3, ....., CUBE31 from GET_DATA(......) B where ..... as cursor cvol do ...
Evgeny's user avatar
  • 4,000
0 votes
0 answers
397 views

Firebird 3 connection string not working in C#

I have a problem after migrating a database from Firebird 2.5 to Firebird 3. The C# application stopped displaying data. I have a 'REPORTER' user assigned to ROLE_SELECT, but not authorized to all ...
brian987's user avatar
0 votes
3 answers
364 views

Distinct max values or only one maximum value from the serial number

I have a database (with two columns "id" and "serial") with serial numbers. For example: id |Serial 10 | A18D003.000106 12 | A13D002.000100 122| A19D004.000107 There are many more ...
statistics pp's user avatar
0 votes
2 answers
569 views

gbak gives system directive access failed on Ubuntu when running from net core application

Basically, I want to run a gbak restore (Firebird 3) from my ASP.NET Core application on Ubuntu. Here is my code: string output = ""; using (Process pProcess = new System.Diagnostics....
user2475096's user avatar
0 votes
1 answer
1k views

How to print message in ISQL / IBExpert Sql tool?

I know that in SQL Server we can print message via operator PRINT, but PRINT doesn't work in IBExpert, and command OUTPUT too. Can someone help me? I have this error when I run previous code:
Nika's user avatar
  • 379
1 vote
1 answer
391 views

Firebird SQL join recommendation

I am using Firebird 3.0. I have 2 tables and I want to get the following result with one query, but I couldn't do this. USERS Table ID USER_NAME 10 User1 20 User2 30 User3 40 User4 50 User5 ...
nakisen's user avatar
  • 13
0 votes
2 answers
89 views

'Custom' group by in select

(edited to minimal reproducible example) I needed some help with the following select: Select Id_Product, -- product identifier Sum(Qt_Sold) Sold_Amount, -- total sum of quantity sold Sum(...
Roberto Henrique's user avatar
2 votes
1 answer
193 views

Round to the next tenth, subtract 0.02

I have an ITEMS table with a PRICE column. I added 4% to the price using the built-in functions in the application, but that leaves the result not in a friendly formats for retail. I want all the ...
john castaldi's user avatar
1 vote
1 answer
143 views

TIB_Script run large script

I encountered a problem that IB_Script returned an error while running a longer script: SQL Error Code = -104 Unexpected end of command - line 18, column 52 As long as the number of characters in ...
Himer Norbert's user avatar
-1 votes
1 answer
103 views

Query and total for each week

user, timeon, timeoff, hours Monday - 1510, 2021-10-25 05:00:00, 2021-10-25 09:00:00 - 1510, 2021-10-25 14:00:00, 2021-10-25 17:00:00 - The total should be 4 + 3 = 7 Tuesday - 1510, 2021-10-25 ...
L_GIB's user avatar
  • 125
2 votes
0 answers
104 views

How can I post updates for deleted records using TEMSDataSetResource in RAD Server 11

I have created a simple new Rad Server Package with resource with a data module to access a Firebird 3.05 database running on Ubuntu 18.0.4. I included sample endpoints and a database endpoint with ...
Randy Sekura's user avatar
2 votes
2 answers
2k views

How to configure firebird 3.0 or set rights so any user can create a DB

I followed this guide for firebird3.0 on ubuntu. It is outdated, since there is no more employe.fdb in the examples and you have to create it itself through the included sql script. My problem is, ...
Namal's user avatar
  • 293
2 votes
1 answer
608 views

Delete empty lines in a text blob

I have a list of email addresses in a table called cc_list (blob(text)). To remove an email address from the list, I have used the replace function update actions set cc_list=replace(cc_list,'email@...
L_GIB's user avatar
  • 125
0 votes
1 answer
307 views

Firebird 3.0 embedded DB after new install of Windows 10 with new Username not accessible anymore

I coded a CRM application in Delphi some years ago and worked with it. Now I reinstalled my computer and the only thing that changed was the Username of Windows 10 itself. Result is, that I cannot ...
Andreas Soraru's user avatar
2 votes
1 answer
7k views

FirebirdSql Data Client I/O error during "CreateFile (open)" operation for file

One of our clients is getting this error very randomly. Once or twice a week. It has only been happening for the last month or so. Error message: I/O error during "CreateFile (open)" ...
Netstrata's user avatar
0 votes
2 answers
770 views

How to get value from table using Firebird trigger

I want to get a value from the table and compare it with inserted value in the Firebird trigger. Here is my code. SET TERM ^; CREATE TRIGGER after_in_systab FOR SYSTEMTAB ACTIVE AFTER INSERT POSITION ...
Zon Ch's user avatar
  • 21
0 votes
1 answer
332 views

Updating NULL fields with values

I have a simple table that was populated without complete data and an integer field was not used immediately, so it has over 20,000 null values. I simply want to change every record with a NULL value ...
Brian Milburn's user avatar
2 votes
1 answer
4k views

Firebird Unable to complete network request to host

Getting this error message randomly from our .Net Core Web Application. There's no problem with connecting. But in the middle of performing a job to grab some report data which can take anywhere from ...
Netstrata's user avatar
0 votes
1 answer
78 views

How to make ledger using Firebird database

I want to design Crystal Report from mentioned query, but I'm unable to fetch data from a Firebird database. SELECT TRANSACTION_DATE=null, PARTICULAR='Opening Balance', DEBIT=null, CREDIT=null, sum(...
Zon Ch's user avatar
  • 21
0 votes
0 answers
28 views

How to remove Firebird's triggers created automatically [duplicate]

How to remove Firebird's triggers created automatically? I've got an error: SQL> drop trigger CHECK_4; Statement failed, SQLSTATE = 42000 unsuccessful metadata update -DROP TRIGGER CHECK_4 failed -...
volkoshkursk's user avatar

1
2 3 4 5