Questions tagged [db2]
DB2 is a family of database servers developed by IBM. Supported platforms for DB2 servers are z/OS (formerly OS/390), Linux, UNIX, and Windows (referred to collectively as DB2 for LUW), and IBM i (formerly OS/400 or i5/OS). Originally designed as a relational engine, IBM has expanded DB2's capabilities on some platforms to include native XML support and an RDF-compliant graph store. When posting DB2 questions, please specify the platform and version.
12,883
questions
0
votes
1
answer
51
views
How to make this delete statement more efficient?
I have a couple of tables. Table_1 looks like this:
Customer | Offer
---------|------
1 | A
1 | B
1 | C
2 | A
2 | C
3 | A
Table_2 looks like this:
Customer | ...
0
votes
0
answers
22
views
Getting DB2 stored procedure output parameter using symfony and doctrine
I am refactoring plain PHP code in symfony (5) + doctrine
my mode is something like:
$sql = "CALL my_store_procedure (?, ?, ?, ?, ?)";
$stmt = db2_prepare($db, $sql);
$p1 = "p1&...
-1
votes
0
answers
27
views
Does a write-only connection for db2 exist with spring-boot and hikari-pools?
I'm trying to optimize calls to a db2-database. I'm using spring-boot with hikari-pools. One hikari-pool is dedicated for read-only connections, and the other one handles the write-transactions.
I ...
0
votes
0
answers
58
views
Create view with Dbeaver
I need to create a SQL view in DB2 using dbeaver.
This view will use variables that are results of other SQL queries run upstream.
Example query 1:
select champs1
from table1
===> store value in ...
0
votes
0
answers
41
views
Combining the "WITH clause" and "MERGE statement" directly into one SELECT statement
Is it possible to get a result if I combine the WITH clause and MERGE statement directly into one SELECT statement? Combining WITH clause with INSERT, UPDATE and DELETE works but MERGE does not work ...
0
votes
0
answers
25
views
Title: How to Recover IBM DB2 Keystore Files (".sth") Using Scalpel?
I am working on a project where I need to recover IBM DB2 keystore files (with the ".sth" extension) from a disk image. I have been using the Scalpel file carving tool for data recovery but ...
0
votes
1
answer
87
views
+300
IBM DB2 iSeries error CWB_MP_TI_EVENT access denied
I'm trying to connect to a DB2 database on AS400 using an alpha version of the .NET core library IBM provides, while my project is written in .NET 8.
Since I have several servers to connect to, they ...
0
votes
0
answers
37
views
Executing Query on on premise DB2 using azure logic app
We are trying to get some records from an On premise DB2 hosted on IBM for I using logic app. We are able to connect to the server using on premise data gateway and are able to get records using the ...
0
votes
2
answers
34
views
CPF5149 with a setll *loval
I get the following error when I try to setll s a logical file
he is my code :
H OPTION(*NODEBUGIO:*SRCSTMT) dATFMT(*DMY)
FOPRBAS00 IF E DISK extfile('...
0
votes
0
answers
45
views
ASP.Net - query Informix Database without client installation
Looking to connect to an IBM Informix database from a ASP.Net application. Is this possible with nugets/references without any SKU or client package installation?
I see that this is possible with JDBC ...
-2
votes
2
answers
29
views
Analyzing Color Breakdowns by Name
I have the following table:
CREATE TABLE Colors (
name INT,
color CHAR(1)
);
INSERT INTO Colors (name, color) VALUES
(1, 'r'),
(1, 'r'),
(1, 'b'),
(2, 'b'),
(2, 'b'),
(2, 'r'),
(3, 'b'),
(3, '...
1
vote
2
answers
108
views
Not able to install/compile perl module DBD::DB2 on Rocky Linux 9.4 with cpanm
I'm trying to install/compile the DBD::DB2 perl module on rocky linux 9.4 with the cpanm commando but it is not working.I tried even On RHEL and Oracle Linux but is not working anyway.
I get the ...
0
votes
0
answers
45
views
Invalid argument value. SQLSTATE=HY009 SQLCODE=-99999 with executemany() using Python
I want to insert records in batches in DB using executemany() using python. I have a below code
def find_data(db_string):
json_str = '[\\"{\\"NAME\\":\\"Aman\\",\\&...
0
votes
3
answers
72
views
To get the previous record which is less than the given date and time
Table USER:
ID
NAME
DATE
TIME
1
ALPHI
2000-09-09
08:29:34
2
DANE
2000-09-09
07:01:02
3
SAM
2000-09-09
06:02:03
4
ALI
2000-06-01
11:11:11
To fetch the the one record, which has the date & ...
0
votes
2
answers
47
views
IBMi SQL stored procedures - how to set comma / decimal point in numbers
I am working on IBMi where whole number and fraction is represented by comma instead of decimal point (eg: 123,45 instead of 123.45).
This seem to be causing SQL functions to fail.
Example:
SUBSTR(...