Questions tagged as 'query'

2
answers

Displaying the last 30 days of a query

I'm trying some alternatives to show only the records of the last 30 days, but I could not make it work, the query I have looks like this: SELECT comunidade.descricao AS nomeunidade ,comcargo.descricao AS nomecargo ,comcolaborador....
asked by 03.02.2017 / 18:31
1
answer

How to round off time?

I have the following function that treats a time that comes from the bank: SELECT f.chapa AS chapa, f.nome AS nome, f.secao AS cod_secao, f.nsecao AS desc_secao, c.codigo AS cod_funcao, c.nome AS desc_funcao,...
asked by 10.02.2017 / 14:47
1
answer

Select rows randomly

I'm developing a very complex system, where in some cases I need to select only a few fields, a friend who has more experience in the area gave me some tips, but he did not explain why. I have the following query that searches all users in r...
asked by 07.12.2017 / 03:56
3
answers

"Translate" MySQL query for SQL Server 2012

What is the SQL Server 2012 query that corresponds to the next MySQL query? REPLACE INTO schedule SET jobname = "sqldump" , last_exec_date = NOW()     
asked by 29.12.2016 / 05:51
4
answers

Sign of different Query

I have a problem submitting Query. I have the alvaraValidade field that only receives Date fields. When I do not put anything in this field, the date field is saved as 0000-00-00 . $sql = "Select * From tb_trabalhador wh...
asked by 25.02.2014 / 13:38
1
answer

How to handle multiple quotes in R?

My problem is to use the quotation marks in a query within an R function. I have to call a list of select * from probes."probes_90_2018-05" For this I do: coelho<-dbConnect("PostgreSQL", fnord) dbGetQuery(coelho,"select * from probe...
asked by 11.07.2018 / 23:17
1
answer

Query to join one column from another

I have tried unsuccessfully to get a result. I have the table with the following Login and Logout information: |Group |User |EventDate |Event |Camp ------------------------ |Evolution |1012 |2014-07-07 10...
asked by 08.07.2014 / 17:40
1
answer

SQL Query Count

I need to make a query where the result is the medals (gold, silver, bronze and total (sum of 3)) obtained by each country in all editions of the Olympic Games. So far so good, the query below already does this. The problem is that the medals...
asked by 20.05.2014 / 00:40
4
answers

SQL query to retrieve all records from last month but up to the current day

Good morning, I need to know a% change from last month's job records to job records made this month. For this I need to compare with the current day, for example. If today was 10/15/2015 I need to count how many tasks were opened between 0...
asked by 30.10.2015 / 12:28
3
answers

INSERT Query does not work inside a loop

So folks, I'm not able to solve this problem of a query inside a foreach loop does not execute. First of all I thought it was something wrong with pdo-> beginTransaction so I commented this part and left pure code only. <?php if (is...
asked by 10.08.2014 / 01:31