Category "db2"

Export command not working on Client node type DB2

Im currently trying to export some data EXPORT TO result.csv of DEL SELECT * FROM "DB2BXXXD"."BTTT060" FETCH FIRST 20 ROWS ONLY from our DB2 z/OS Database serv

Errors unique to Db2 SQL queries

I am using Hacker Rank to learn SQL sufficiently to pass coding interviews. I have noticed an error in the online compiler when I run it using DB2. In Oracle,

DB2 function timing out with a deadlock or timeout error in query

I have created the following DB2 function below: CREATE FUNCTION CLAIMS.get_gross_amount (payment_option varchar(30),fy date, released date, grossamt int, taxam

Error connecting to DB2 with python and sqlalchemy - Connection info needed in SQLAlchemy format

I'm trying to connect to an IBM DB2 database using SQLAlchemy connection format but it keeps failing to connect. I am using these libraries: !pip install sqlalc

Reverse EBCDIC sorts numbers before letters in ROW_NUMBER function

So I do have following SQL select SELECT FOO.*, ROW_NUMBER() OVER (ORDER BY KEY ASC) AS ROW_NUMBER FROM FOO Key is of the type VARCHAR(12). I wonder why the h

How to select rows that are not in table B but they're in table A ( left join )

I'm using DB2 to develop an app, I have the tables products, price and cost, these tables store products data at this way: As you can see, for this example

Weird OleDbDataAdapter Fill behavior (hangs with explicit fields) on IBM i System

we're migrating our IBM i System from OS 6.0 to 7.4; we're testing all the applications which somehow connect and read/write data to it and we found a weird beh

How to search for multiple strings in a field in DB2? my query fails with '' (black/empty) values

Is there a way to build a DB2 query to search a combination of strings in a field? I am trying to do this: select ITEM, ITEM_DESC where instr(ITEM_DESC,>par

vertx-db2-client return error codes when querying data with chinese characters

Like picture above Are there some options to control the encoding? (switch between UTF8 and GBK?) I found a DEFAULT_CHARSET property(the value is utf8) in io.v

Java 8 Performance Issues In Windows Server 2019

I have recently migrated some scheduled jobs from a Windows Server 2012 virtual server to a new Windows Server 2019 virtual server, and have noticed some notabl

Python Pandas read_sql rounds and converts numbers

I'm executing a query on IBM DB2 server with ibm_db_dbi. Here is my query: connection = ibm_db_dbi.connect(hostSettings, '', '') ret = pd.read_sql(query, connec

How to find out the data which is positive number and having ' . ' in the data?

I want to find the data which is having positive number . How many records have the positive values. find out the ' . ' in the data We are using db2 database h

C# how to call an as 400 stored procedure using oledb

Hi I am trying to call an as400 stored procedure using OleDB. Could you please post an example of how to do it cause I've been following some tutorials but not

Number of days in a month in DB2

Is there a way to find the number of days in a month in DB2. For example I have a datetime field which I display as Jan-2020, Feb-2020 and so on. Based on this

Trouble with formatting date prompt in Cognos Report Studio Version 10.2.1

I'm having trouble with an error that says: UDA-SQL-0144 An arithmetic exception was detected.[IBM][CLI Driver][DB2/NT64] SQL20448N "1993" cannot be interprete

Relacing a word in an db2 sql file causes DSNC105I : End of file reached while reading the command error

I have a dynamic sql file in which name of TBCREATOR changes as given in a parameter. I use a simple python script to change the TBCREATOR=<variable here>

db2 database owner

How to get/change db2 database owner?

Basic commands (db2level) not running on no cost Db2 Community Edition 11.5.5 (latest)

The previous DB2 Express-C versions were working fine over the years, but the basic commands not running on no cost Db2 Community Edition 11.5.5 (latest) . afte

Method executeQuery cannot be used for update. ERRORCODE=-4476, SQLSTATE=null

I am using Spring batch framework to read from db2 and getting error. Please note that same is working fine with Mysql. When using db2 its making entry in meta

DB2 SQL How do I turn a number into a string then concatenate a percent sign onto it?

I would like to display 71% in my RESULTS field. I have rounded the decimal percentage first (it was 71.04), now I want to turn it into a string so that I can c