Questions tagged as 'db2'

2
answers

Doubt while sql

I need to get all 5 values before ~3L of XXX: ~1BLB~2B1C~3L~1TPL~2B39~3L~1RAD~2C1D~3L And so on. I've been able to get it to get the first value before 3L with this select: db2 "select SUBSTR(FH01XXX.pnrstring,(POSSTR(FH01XXX....
asked by 05.01.2015 / 14:44
2
answers

How to create two connections with different databases?

I need to pass data from one database (DB2) to another (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, / em>, I can only do SELECT , I thought of making two connections...
asked by 24.01.2015 / 16:17
1
answer

Query - Comparison of distinct bases with equal columns

How would a query make the selection 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 are not with the same balance. Tab1...
asked by 30.04.2018 / 21:08
1
answer

ibm_db2 PHP7 Nginx

I'm having trouble starting the ibm_db2 extension on my server. It's a 16.04 Ubuntu Server, running PHP7.0 + Nginx I installed with pecl install ibm_db2 I added the roads in etc / php / 7.0 / fpm / php.ini extension=ibm_db...
asked by 09.11.2016 / 18:03
1
answer

SQL returns two records for a field, how do you 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 INNER JOIN acad_alunos_cursos as alc ON alc....
asked by 22.12.2014 / 17:39
1
answer

Error executing JSF page in Tomcat

Well, I have a problem here that is difficult to solve. I'm trying to list some disciplines on a JSF page, follow the code: DisciplineBean.java @ManagedBean(name="disciplinaBean") @SessionScoped public class DisciplinaBean { private...
asked by 06.01.2015 / 02:53
0
answers

How to insert a Trigger Insert into the Inventory table after Insert in the Product table in IBM DB2

I'm trying to learn the basics of DB2 and have modeled a database where I need to insert a default value for each product in the "product" table as shown below. This insertion is performed by a trigger that works with the proper syntax in both M...
asked by 12.05.2018 / 20:22
1
answer

Turn decimal into timestamp

Hello, I'm doing a project where I should work with DB2 . There is a table where two columns of type DECIMAL were made. To be more exact, the following code is created: [DATA_VARIAZIONE] [decimal](8, 0) NOT NULL, [ORA_VARIAZIONE]...
asked by 09.05.2018 / 13:48
1
answer

Build Query with JOINS

I have a query run 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 gives error, all my classes are with their due...
asked by 26.10.2018 / 17:30
1
answer

Error in group by of a query in db2 SQL

Query: 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 ((ITEMNFS.NRO_NFS = NFS.NRO_NFS) and (ITEMNFS.SERIE = NFS.SER...
asked by 20.02.2018 / 13:25