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 ...

0
votes
0answers
4 views

Oracle to DB2: Date formatting

brand new to stack!I'm trying to convert this oracle snippet to make it run in db2. However, I'm running into the error:Database Error: ERROR [22007] "01-2018-07-01-00.00.00.000000-2015-10-01-00....
0
votes
1answer
22 views

How to combine three queries?

I have three queries and i have to combine them together. Query 1WITH ph AS (SELECT chrd, chwo, chse, chst, chvr, chfv, chrd, ROW_NUMBER () OVER(PARTITION BY chwo ORDER BY chse, ...
0
votes
0answers
11 views

sqlopenresult' status='-239' / cognos report error

Does anyone knows solution for the error sqlopenresult' status='-239.I got this error while testing a cognos report.Any help would highly appreciate !Thank you....
1
vote
2answers
33 views

Select value from both OLD TABLE and FINAL TABLE during UPDATE

I have an UPDATE statement I've written that will take a @CHANGE (positive or negative integer value) and update the CURRENT_INVENTORY for that type of item.UPDATE ITEM_INVENTORYSET ...
0
votes
0answers
36 views

DB2 COBOL EXEC SQL view table VS accessing table

I was wondering when we should use in a COBOL program the table view to fetch information and when we should use the "full" table per say.What are the advantages of one versus the other?If we are ...
0
votes
2answers
15 views

db2 create index but hit SQLSTATE=42703

I have a table created successfully.1 of the column name is code and another 1 is "deleted".Thus, I plan to use this 2 field to create its index. I am doing something like follow:CREATE INDEX ...
1
vote
1answer
35 views

SQL0443 error when executing a Select with a Trigger on DB2 for iSeries

I've some problem querying a db2/as400 table, let's call it TAB1. Since it was added a trigger on this table when I perform a normal SELECT (using the TAB1-key) I get the following error. Never had a ...
0
votes
2answers
22 views

How to check if the SQL cursor is pointing onto the first record of a file in ile rpg?

I made a file with pictures and its working like a photo gallery.So, when I go back with F12 I want to see the prior record in the file.If the cursor is reaching the first record of the file, the ...
0
votes
1answer
33 views

How to eliminate duplicate rows but the maximum value in the rownumber(),of these rows be in the result?

My query :SELECT CHR,CHNO,CHSQ,ROW_NUMBER () OVER(PARTITION BY CHNO ORDER BY CHSQ DESC ) TEMP,CHSB,CHVR,CHRDFROM WRPDAT.WSCLHPWHERE CHADT > '20180901' AND CHSB='R' AND CHB1 in ('L1', 'R2')...
1
vote
0answers
29 views

DB2: The user defined function or procedure was unable to map to a single Java method

It seems as if the procedure is not able to find the java method inside the jar file,import java.io.BufferedReader;import java.io.DataOutputStream;import java.io.InputStream;import java.io....
0
votes
0answers
22 views

how to connect to my AS400 DB using Visual Studio Code?

Im trying to connect to DB2 using Visual Studio Code, anyone knows how to do that?Im actually connect to SQL Server without issues.Any ideas?Regards
0
votes
0answers
20 views

Db2 z/OS logon trigger similar to SQL SERVER

In Db2 z/OS v10, is it possible to use a logon trigger? I need something similar to SQL server logon trigger.I want to create stored procedure and it must be automatically execute whenever the user ...
0
votes
0answers
42 views

Query to select records from multiple tables based on search criteria from UI

I am trying to display results based on search criteria from UI. Search is performed in three tables and the tables are as below...The search criteria in the UI are Name, Number of Arrears, Arrear ...
-1
votes
0answers
28 views

Current month and prevoius month logic in cognos prompt page

I want to designed a report in a cognos which showcase data for current month or prevoius month choice on prompt page, need to get logic for this.Please advice if any one has solution for this...
1
vote
1answer
33 views

DB2 Trigger before insert

DB2 Trigger before insert not working to delete a row in tableCREATE TRIGGER WDW.user_name_search_delbefore INSERT ON WDW.user_name_search_bREFERENCING NEW AS newFOR EACH ROW MODE DB2SQLBEGIN ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,