Questions tagged as 'query'

0
answers

Query Performance - HELP

I'm doing a query , however I'm learning now. Can you improve the performance of this query? select a.COD_EMPRESA, b.Dat_pagamento from SAS_EMPRESA a full outer join SAS_ITEM_PAGO b on (a.COD_PREF_EMPRESA || a.COD_EMPRESA = b.COD_PREF_EMPRESA...
asked by 17.11.2017 / 19:28
0
answers

PostgreSQL compare time between two hours, and if you exceed the hours of the day, limit until 23:59

I am making a query sql on ruby-on-rails on PostgreSQL where I check if user input is between hora_entrada and hora_entrada + (hora_entrada + limite_banco_horas) and same for hora_fim , in a certain...
asked by 09.11.2017 / 17:35
1
answer

FPDF with MySQL and PHP - Bringing repeated data

I'm trying to set up a generator system of Vouchers/Tickets I have a table in SQL with the name Vouchers with multiple users and their respective passwords. I call each cell the variable $serial_voucher and $senha_vou...
asked by 11.11.2017 / 23:14
0
answers

Subquery at Banco Informix

I have a query that searches sales for a period: SELECT cxpdvend.filial, cxpdvend.dtpedido, cxpdvend.pedvenda, ciendere.nro_endere, cipessoa.nomepessoa, ciendere.celular, cxpdvend.codagente,...
asked by 19.10.2017 / 11:14
0
answers

Query does not return value

I have a query in the header of the page that returns the title, the meta name="description" and the meta name="keywords" that works very well. However, applying this same query structure to the body of the page returns no value. I already teste...
asked by 16.10.2017 / 03:53
2
answers

Query criteria with wildcard

I'm trying to use wildcard character as query criteria in my query, but the result is returned empty. include_once ("../ inc / connection.php"); $lj = "4"; $linha = isset($_GET['ans'])?$_GET['ans']:""; $data = date("d-m-Y"); $partes...
asked by 20.10.2017 / 00:38
1
answer

Run SQL Server UPDATE error

Running the update statement below is experiencing the following error. What can it be?    Msg 116, Level 16, State 1, Line 3   Only one expression can be specified in the select list when the subquery is not entered with EXISTS UPDATE Est...
asked by 13.10.2017 / 19:20
2
answers

Query with result null Firebase

Hello everyone, I'm having a problem querying the firebase database. The bank is this: I'mtryingtodoasearchforalltherestaurantsthathavethenameIguatemi,untilthenaccordingtomydebug,I'mgettingtodoitgood.Theproblemisthatwhenthedataistaken,iti...
asked by 03.10.2017 / 15:20
0
answers

Change MySQL query to work in SQL Server and Oracle

Would anyone know how to tell me how this MySQL query would look like in SQL Server and Oracle? SELECT COUNT(*) AS TOTAL, SUM(EVENTO = 7 AND RESULTADO = 0) AS QTD_RX_OK, SUM(EVENTO = 7 AND RESULTADO <> 0) AS QTD_RX_ERR, SUM(...
asked by 25.09.2017 / 16:48
0
answers

Generate sql script on a given date

Good afternoon! Well, I have a great mission that is as follows. I have a script that I set up below that I need it to be executed only on the 1st of each month, respecting the two conditions that I put in the IF clause. I tried via trigger a...
asked by 06.10.2017 / 20:05