I am using DB2LUW 11.5. I build a json and gets an output like this But I want the id from B_OBJECTS listed only once. Here is my query... I ...
I am using DB2LUW 11.5. I build a json and gets an output like this But I want the id from B_OBJECTS listed only once. Here is my query... I ...
I want to create a view from another view that I have select statement privilege. However, I can't and I am getting this error. Do you know why? Do I ...
Can I rewrite this select without using aggregate function to retrieve the highest value Select * From A Where Id= 123 and value = ( select max(value ...
More of an amusement than a real problem, but is it possible to get higher precision than microsecond in current_timestamp. Syntactically: works fi ...
In my trigger I want to throw an exeption, but it is not working properly, got exception. Using DB2 LUW ...
According to the example of Generate aggregated Json data from Json string in java, I want to cache the result length in a variable within a function ...
I want that the output of the select for the column FORMATTED_JSON is null if it is empty instead of empty object, means This is the query: ...
This query seems to be valid in Db2 v11.5.7.0: SELECT listagg(DISTINCT x, ',') WITHIN GROUP (ORDER BY x) FROM (VALUES (1), (1), (2)) t (x) But it f ...
I want to fetch first 10 rows as per below condition and also where tabname = 'TABLE1' and 'TABLE2' (if these tables are not in first 10 rows even) F ...
I have a procedure with the following lines: The value of ITERATOR is set dynamically in a loop I am getting the following error in iSeries db2 - ...
I am trying to find all table names of a certain schema, this works with the following query: Now I want to filter these tables again, so that I on ...
I have a DB2 table where NUM column is defined as INTEGER in DB2 and the query result is shown below, NUM columns have numeric values which needs t ...
I don't want to execute the stored procedure with admin privileges or with the instance owner. I am looking for the minimum permissions required to ex ...
I am trying to restore a DB2 database using an encrypted backup file. The backup zip file contains an .lst file, a .ddl file, over 3000 .ixf files, sa ...
In DBeaver 22.1.2 I created connection to Db2 v11.5.7.0 database with user1. Every time to start working with connection I do: Right click on con ...
How to find out Server name, Instance Name, DB name in DB2 via sql query. I was found it via shell scripts. Need via sql scripts. ...
I've followed several guides online and I cannot install IBM DB2 ODBC DRIVER on Windows. I have downloaded the driver from IBM and installed (which w ...
I use IBM Data Studio (4.1.3 and 4.1.4) to develop stored procedures (native) and functions on DB2 Z/OS (V12) and DB2 LUW. Unfortunately Data Studio i ...
I have below table and would like to get the result in ROW_NUM Column. I tried this but don't get what I need. ...
I have an application migrated from oracle to db2. There is a package defined where some of the procedures are using pragma autonomous transaction to ...