Questions tagged as 'db2'

0
answers

Select DB2 Queries

Good morning, By making a query in my DB2 Database, we noticed something curious. When I query a Table depending on the where condition, it displays the data. SELECT NOMBRE FROM X WHERE NOMBRE = 'aaa ' Result: "aaa_" - >...
asked by 31.01.2018 / 15:20
3
answers

Perform Search between dates. Sql Server

Good afternoon, I'm doing a simple query of a logical in db2 that is numeric but contains dates of the following format 20170831, but when doing the query with both 'between' with the operators '> = < =' brings all the existing dates....
asked by 31.08.2017 / 21:09
1
answer

If I have such a SQL query using WITH (CTE) can I get the same results without it?

I was doing a view that uses WITH, and it turns out that the Web Client Compiere does not get along with the views with WITH .. (they told me) Then I wanted to know if I can reach the same results in the data without using WITH. If you hav...
asked by 23.02.2018 / 15:31
1
answer

How to connect to as400 from csharp

Good afternoon, I need help how can i connect to as400 database db2 d from c sharp calling the data to a datatable and showing them in a datagridview? because I get pure connection information but from a console application I would appreciate yo...
asked by 15.05.2018 / 19:25
1
answer

Update the prefix of a field

I need to change the prefix of one field to another for all records before a date. UPDATE tabla SET campo1 LIKE 'YYYYYYY%'; WHERE (campo1 LIKE 'XXXXXXXXXXXXX%' AND FECHA<DATE('2017-04-05')); The following error report appears: Error SQ...
asked by 27.06.2017 / 13:34
0
answers

DB2 QUERY - HELP

I have the following doubt, I have two tables "TEJCRETE" and "CCEPTCPT" and I need to calculate the minutes of difference between FECFIN - FECINI. However, it may be that some dates overlap. That is to say, In the example, only my total minutes...
asked by 09.11.2018 / 18:03
1
answer

Query comparing two fields from two different records

I need to make a query in a table that compares the value of a field in the table with the value of the same field in the table in another record. If the table is something like this: | Contrato | Oper | Importe | +------------+-------+-...
asked by 17.09.2018 / 10:53
1
answer

Error Connection spring boot with database db2

Good afternoon friends I am trying to connect a spring boot application with db2 but I get an error that is the following: Caused by: org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution at org...
asked by 31.05.2018 / 21:53
0
answers

ODBC_FETCH_ARRAY () Does not return the result

Good morning, please help with this topic. I need PHP to be able to place the result of a query in an array using an ODBC connection. For this, I use the odbc_fetch_array () function but the query is not showing me. The code is: $consulta =...
asked by 25.05.2018 / 19:50
1
answer

Subquery SQL DB2

I am trying to make a subquery (in a particular column) within the base query. The code is as follows. select z.po_id, max(SELECT etcdc.ship_evnt_tms from COVINFOS.SHIPMENT_EVENT etcdc where etcdc.SHIP_EVNT_CD = '9P' and etcdc.ship_id=scdc.sh...
asked by 17.04.2018 / 21:48