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

Avoid unnecessary update in “update or insert” SQL?

Here is Firebird SQL description for update or insert: And my example If book already exists with id=555 and name=’Good book’ then this command executes update statement anyway and the triggering of update triggers is the only effect of such update, no change of the values for the record. Is it possible to request in this SQL that there

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