Questions tagged as 'sql'

1
answer

12 columns of months = 1 column of values + 1 column of month

I have a table with SQL binding (PERVASIVE) with one column per month, that is, 12. In order to better work the data, I need to transform the 12 columns into only 2 ... a 1ª with the values that were in the 12 columns and a 2ª column with the re...
asked by 14.03.2017 / 00:55
1
answer

Concatenate Lines with the same User

I have the following query: SELECT e.id_taxe, u.nm_user, dt_taxe, SUM(e.vl_taxe) as vl_taxe FROM taxe as e INNER JOIN user as u ON u.id_user = e.id_user WHERE id_enterprise = 86 AND (dt_taxe BETWEEN '2017-01-01' AND '2017-03-31') AND lg_can...
asked by 13.03.2017 / 19:11
0
answers

mysql accusing error when trying to insert a timestamp

I'm trying to pass a timestamp per parameter to a function, but I end up getting a ERROR: invalid input syntax for type time: "10" The section where I pass is: select agendar('2010-01-01 10:00:01') The snippet you receive is: CREATE...
asked by 14.03.2017 / 03:29
1
answer

Error nullpointer when doing query in the bank with parameter

When I run the query below I have a nullPointer error. @Query(value = "SELECT * FROM x WHERE USER_NAME = :name", nativeQuery = true) DataBaseCobilling findByCdIdent(@Param("name") String name); But when I run this one it works: @Query(val...
asked by 21.03.2017 / 15:24
1
answer

How to add many clients at once in a database table?

I need to add Name, Phone and Address of many clients that are in excel and pass this to the database. What would be the quickest way to do this?     
asked by 07.03.2017 / 21:48
1
answer

Conversion of SSIS data from varchar to int

I'm stuck on a SSIS conversion, scenario: I have a CSV file, which I need to import into a table already created in the database, In this database table I have an already populated column that receives data type INT, I noticed that there are...
asked by 07.03.2017 / 22:31
0
answers

When I run Update eclipse to run

When you get to the part that executes the following query, the system stops and does not proceed to the next line. @Query(value = " UPDATE COOBILING_NUMBER SET CONDITION='Used' WHERE NUMBER_PHONE= ?1", nativeQuery = true) public void update(S...
asked by 21.03.2017 / 21:48
2
answers

SQL produce a MySQL report

Good morning, In the following table is an extract from the otrs.ticket_history table where it depicts a log of the status changes of a ticket / request: Thegoalistogetatablelike: in which the sum of the time in minutes (I used the T...
asked by 02.03.2017 / 17:23
1
answer

Ajax, Javascript and PHP form

How can I make a form with a UF field and a selection field with cities label that will be filled through AJAX and that when selecting the UF the function JS makes the connection with the server and returns the cities of that UF but without searc...
asked by 27.02.2017 / 15:44
1
answer

postgres compare time extracted from a timestamp

I need to extract the hours and minutes of a timestamp in mysql, I tried to use maketime (); CREATE OR REPLACE FUNCTION agendar(dia timestamp) returns bool as $$ declare hora time := extract(hour from dia); minuto time := extract(minute from...
asked by 13.03.2017 / 03:16