Skip to content

Tag: firebird

Summarize unique column in row

I’m new to Firebird and need your help. I have a stored procedure with following reduced output: Player Team Number Reus Ahlen 18 Lewandowski Posen 19 Reus MG 11 Reus BVB 11 Lewandowski BVB 9 Haaland BVB 9 I want to summarize the Players and transform Team&Number to a new column. The output should be: Player Station 1 Station 2

Finding computed fields in Firebird 2.5

Computed fields are readonly. I need to find all such fields in specific table. This query solves this problem (returns info if column is computed or not): At least it looks like it solves it, but it seems that returned informations are incorrect. When RDB$UPDATE_FLAG is 0, its computed (readonly). But its 0 even for normal columns. Answer If you

Firebird column unknown on SELECT AS

I have a table of calls and their durations: I want to select all numbers that called for over 500 seconds in total. My query uses SELECT AS to rename the SUM(…) field so I can reference it in the HAVING clause: When I run this query in Firebird SQL, I get the following error: Answer You can not use

SQL execute block using update

I am trying to perform an execute block using an update. However I am getting an error. The SQL shown here is similar to the real problem, but the update is much more complex. I need to use every declared cust_id into the update block. How can I accomplish that? Answer you cannot use do begin after our update statement