Most voted "db2" questions
DB2 is a Relational Database Management System (SGDBR) produced by IBM. There are different versions of DB2 that run from a single handheld computer to powerful mainframes and run on Unix, Windows, or Linux based servers.
Learn more…20 questions
Sort by count of
-
4
votes2
answers98
viewsDoubt while sql
I need to get all five figures before the ~3L of the XXX: ~1BLB~2B1C~3L~1TPL~2B39~3L~1RAD~2C1D~3L And so on and so forth. I already managed to make it takes the first value before the 3L with this…
-
3
votes2
answers2737
viewsHow to create two different database connections?
I need to pass data from one database (DB2) to the other (Mysql), and I’m thinking about how to do this, as in the database I have the data I do not have access to some tools, how to do the backup,…
-
2
votes1
answer87
views -
2
votes1
answer96
viewsQuery - Comparison of Distinct Bases with equal columns
How would a query that selects between two tables according to the value of a specific column ? For example: I have two tables that contain account number and Balance, I need to know which accounts…
-
2
votes1
answer91
viewsSQL query where the last 2 digits of WHERE should be ignored
I’ll try to get to the point. I got the following SELECT: SELECT * FROM "Inverter" WHERE "InstallationUUID" = '0D013C023900-15-0B4B00' AND "CreatedTime_Key" > 20170718000000 AND "CreatedTime_Key"…
-
1
votes1
answer554
viewsSQL returns two records to a field, how to join them?
I have the following SQL code in DB2: SELECT p.nome_pessoa, a.dt_nascimento, alc.matricula, d.numero_documento, d.id_tdoc_pessoa FROM pessoas as p INNER JOIN alunos as a ON p.id_pessoa = a.id_pessoa…
-
1
votes1
answer498
viewsError running JSF page on Tomcat
Guys, I have a problem here that is hard to solve. I’m trying to list some disciplines on a JSF page, follow the code: Disciplinabean.java @ManagedBean(name="disciplinaBean") @SessionScoped public…
-
1
votes1
answer126
viewsSelect with LIKE operator using an array
I am trying to select with LIKE operator using an array, but it is returning error when forming the string. SCRIPT placeholder= '?' placeholders= ', '.join(placeholder for unused in NAMES) query=…
-
1
votes1
answer24
viewsTurn decimal into timestamp
Ola, I’m doing a project where I should work with DB2. There is a table where two columns of the type were made DECIMAL.To be more exact follow the creation code: [DATA_VARIAZIONE] [decimal](8, 0)…
db2asked 6 years, 6 months ago Um Programador 1,491 -
1
votes0
answers453
viewsHow to insert a Trigger Insert in the Stock Table after Insert in the Product Table on IBM DB2
I am trying to learn the basics of DB2 and modeled a database in which I need to insert in the table "stock" a default value for each product registered in the table "product" as cut below. This…
db2asked 6 years, 6 months ago Jose Ramos Silva 11 -
1
votes1
answer90
viewsCharset encoding/decoding error between DB2 and Nodejs
My problem: I have a Node application that sends messages to a specific Whatsapp (works normally, without character error). But when performing a query in the database (IBM DB2) and send this data…
javascript node.js character-encoding db2asked 3 years, 10 months ago AssuntosDev Gilberto Carlos 11 -
0
votes0
answers96
viewsDb2 query com between and Partition by
I need a help with this query below, it is not doing what I would like. It makes everything perfect. But when I use the between it returns an error. I would like a help on the query. SELECT UNIDADE,…
-
0
votes1
answer126
viewsGroup by error of a query in db2 SQL
The Consultation: Select ITEMNFS.Recnum, ITEMNFS.ITEM, sum(ITEMNFS.VL_TOTAL), sum(ITEMNFS.QTDE_FATUR), ITEM.PER_IPI from ITEMNFS inner join ITEM on ITEMNFS.ITEM = ITEM.ITEM inner join NFS on…
-
0
votes1
answer109
viewsHelp with DBMS_STATS.GATHER_TABLE_STATS - Oracle for DB2
I am passing an Oracle protocol for DB2 and I am not able to run on DBMS_STATS account.GATHER_TABLE_STATS : DBMS_STATS.GATHER_TABLE_STATS ('DMTLDBR','TB_FATO_OBJETIVO',PART_MES_ANT,10, TRUE,'FOR ALL…
-
0
votes1
answer98
viewsMount Query with JOINS
I have a query executed on DB2: SELECT f.* FROM Fat f INNER EFat ef ON f.id = ef.id AND f.seq = ef.seq How do I reverse it in Java? I tried this way, but it’s wrong, all my classes are with their…
-
0
votes3
answers80
viewsDoubt with IBM DB2 rule
Guys I’m having a hard time transcribing this sql server structure to IMB DB2. Could someone help me. with cte as ( select CASE WHEN CONVERT(datetime, format( getdate(), 'HH:MM') ) BETWEEN '06:00'…
-
0
votes1
answer22
viewsAutomation of code
Using a DB2 database I need to automate a query and currently have the following scenario: SELECT * FROM tabela WHERE DATA1 < '2020-06-01' AND DATA2 >= '2020-05-01' How to make date conditions…
-
0
votes1
answer73
viewsPython - Error: SQLCODE=-30082r] SQL30082N Security Processing failed with Reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
Hello! I need help with the following problem: I made a script in python to collect data from a DB2 table and generate a spreadsheet. I’m in the testing phase, but the idea is that the script will…
-
0
votes0
answers35
viewsException when executing UPDATE clause on IBM DB2
Hello, I am doing an UPDATE on an IBM DB2 database, and is returning this message: DB2 query node, error in query: Error: [IBM][CLI Driver][DB2/LINUXX8664] SQL0100W Não foi localizada uma linha para…
-
-1
votes1
answer36
viewsHow to insert multiple Rows, where some Rows will have fewer values than columns
I’ll try to give a simple example of my problem. I have the following columns in a table called "Test": Name | Age | Gender | Nota1 | Nota2 | Nota3 I want to insert multiple lines in the table, but…