StackOverflow is a collaborative programming Q&A community venture
Note: The content of this blog is the opinion and thoughts of the blogger and does not necessarily represent the opinions of IDUG.
ROW_NUMBER() in DB2
How to use ROW_NUMBER() in where clause in DB2 database. I have tried below but it did not work:
It gave error : Invalid use of aggregate function or OLAP function.
I also tried with followiong ways :
Python DB2 - Symbol not found
After updating to Mac Catalina (version 10.15.6), I had to re-install Python and all dependent modules.My problem now is that when adding the module ibm_db, I get the following error message when trying to run my program:
I am using PyCharm 2018.3.7 (CE).
Anyone that has seen this, and have a fix for this?
DB2 interpret poorly formatted date
I have a tool which is populating a merge field I am using as part of generated SQL. The format is 113 (04 Aug 2020) and I cannot change it. What is the best way to make DB2 interpret this as a date?
The file system is full.. SQLCODE=-968, SQLSTATE=57011, DRIVER=4.18.60
When I try to run a long query in DB2, I am getting the below error:
There is lots of memory available in C drive. So memory is not an issue.
There are 65 table spaces available in the database.
It works fine for other smaller queries but for one long query, I am getting this message repeatedly in DB2.
I have tried multiple solutions but with no luck.
Please help to fix this issue.
Skip creating JSON_OBJECT if there is no data
I am working on creating a single JSON_OBJECT which has multiple layers that should not create a JSON_OBJECT if there is no matching data. In the example, I am showing how I am creating it with skipping a level if there is no data, but I am hoping there is a better and simpler way to do this as I cannot get this way to work with the current issue. The ending place for this JSON can not handle null JSON_OBJECTS, so they would like them excluded from the file.
As you can see there is no matching action for one of the conditions.This is how I am currently creating the JSON, which does not remove the extra JSON_OBJECT as needed, but does show how I am creating one level if needed for a foreign language.
-- Create a wrapper around Condion/action, fCondition2 as (select json_object('condition': json_arrayagg(sCondition1 format json)) as sCondition2from fCondition1)
-- Create the final outcome
This is the results that I currently get:
This is the results that I am trying to get:
Get a rows based on the Max value in one of the columns DB2 sql
Need your expertise with below scenario, any helps greatly appreciated.
Get a rows based on the Max value in one of the columns in DB2 sql
With below query I am not seeing latest version bank name.
Fetching data from DB2 Views
Is fetching data from a DB2 view and DB2 table both are different or same please explain?What are the things will change in connection string?
DB2Driver.changeDB2Password returns invalid URL when password is 15 characters
I created a java tool using DB2Driver.changeDB2Password and it works successfully when the zOS password is 8 characters long. However, our zOS system implemented a minimum 15 character passphrase that users are switching to and when we attempt to use the tool to change a 15 character password, we get the following error:
Change the URL to 'jdbc:db2://iccmvs2.pok.ibm.com:6009' and it's successful. However, our new password phrase length is min 15 .. max 100 characters.
I can't find any documentation on the URL length. What's the URL length? or did I find a bug?
db2jcc4.jar : v11.1 : IBM Data Server Driver for JDBC and SQLJ 4.24.92
How to return Cursor as OUT parameter in DB2 for z/OS
I'm using DB2 for z/OS as my database. I have written one stored procedure in DB2 where it will return some result set. Currently I have declared one cursor and calling OPEN Cur at the end of the stored procedure. I,m calling my procedure from Java and I'm getting the result set using
I want to know
How to connect internal private DB2 to Cognos Dynamic Dashboard Embedded on IBM Cloud
Im working on cognos dashboard embedded using the reference from -Cognos Dashboard embedded.
but instead of csv i'm working on JDBC data sources.i'm trying to connect to JDBC data source as -
Note - here my database is hosted on private network on not hosted on public IP address.
So when i add the above code to add datasources, then the data is not loading from my DB,even though i mentioned correct user and password for jdbc connection in above code then also when i drag and drop any field from data sources then it opens a pop up and which asks me for userID and Password.and even after i filled userID and Password details again in popup i'm still unable to load the data.
1 . when any module try to fetch data then calls API -'https://dde-us-south.analytics.ibm.com/daas/v1/data?moduleUrl=%2Fda......'but in my case this API is failing and giving the error - Status Code: 403 Forbidden
Expectation -It should not open a pop to asks for userID and password. and data will load directly just as it happens for database hosted on public IP domains.