Questions tagged as 'query'

2
answers

Error fetching Time and Date

I am registering in the MySQL database values such as time and date. Code JAVA : public String getDataPedido() { StringBuilder horaSistema = new StringBuilder(); GregorianCalendar pegarHora = new GregorianCalendar(); hor...
asked by 03.06.2015 / 17:09
1
answer

check the available time periods in the SQL table

I'm developing a scheduling schedule for a software that manages schedules available for scheduling, it seems odd that I post this here more by incredible than it seems I did not find anything of the genre here on the web, well my scenario is as...
asked by 14.04.2015 / 06:11
1
answer

Inner Join, multiple Inserts with multiple conditions

Well, it's the following, I do not understand where I should start, if I must first select the clients, I'm sure I'll use inner join or some joiner since it uses other help tables. I wanted help to understand how to do this query....
asked by 10.03.2015 / 13:48
1
answer

Select rows in a PostgreSQL array

I'm using the PostgreSQL and Python database to query it, I have the following modeling: I'mtryingtomakeaquerythatreturnsallOrderItemsofaOrdertoaarray,forthisImadethefollowingcode:selectARRAY(SELECT'('||translate(string_to_array(x.*::"text",...
asked by 11.12.2014 / 20:57
2
answers

Sort in recursive query

In another question I asked I had found a solution but the sort order works only if the ID's are growing: USE TESTE GO WITH Niveis AS ( -- Membro âncora SELECT Id, IdPai, convert(varchar(1000), Nome) as Nome,...
asked by 27.02.2015 / 16:06
1
answer

Transform javax.persistence.Query to ArrayList

It is possible to transform a javax.persistence.Query into ArrayList . I need to return an object of type Query but can not have all result values. I want to delete some results based on some tests, the code is below. I...
asked by 13.11.2014 / 03:24
1
answer

QUERY SELECT (oracle sqldeveloper)

Have the query below. SELECT 'A. ABERTOS' QUANTIDADE, (SELECT SUM(S) FROM (SELECT COUNT(*) S FROM VW_SOLICITACAO_DETALHE VW INNER JOIN SOLICITACAO SOL ON SOL.ID_SOLICITACAO = VW.ID_SOLICITACAO WHERE (VW.COD_TIPO_SERVICO IN (...
asked by 23.11.2014 / 03:13
1
answer

Update with inner query selecting the same table

I have the following query: UPDATE cp_feedback_trabalho as a SET a.visivel = 1 WHERE a.dhEnvio IS NOT NULL AND EXISTS ( SELECT b.id FROM cp_feedback_trabalho as b WHERE b.id_pessoa_que_enviou = a.id_...
asked by 30.07.2014 / 01:32
2
answers

Strange (green) code coming back from the database

I have the following PHP query $mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE); $mysqli-> set_charset("utf8"); $stmt = $mysqli->prepare("select header, title, footer, head from configs"); $stmt -> execute(); $stmt -> bind_...
asked by 29.07.2014 / 14:45
2
answers

Query using Mongoose in Nodejs always returns null even within asynchronous method

I'm trying to retrieve a document in my Database using Mongoose in Node.js but it always returns Null. My problem before was the asynchronous method, but now everything is running inside it. And I'm just trying to print the recovered document fr...
asked by 23.07.2014 / 17:01