Questions tagged as 'sql'

2
answers

Select dates that are not in the table

I need to set up a report for a customer with the billing for each day of a given month. So the beauty, the problem is that now he wants even the days that have no sale, are shown in the table with the value showing zero. For example, this my...
asked by 14.08.2018 / 13:32
1
answer

What are the differences between Stored Procedures and Functions within Sql Server?

This is a somewhat academic question, but the question has come to me. What are the differences between one and the other? What should I consider to choose each case in certain scenarios? Thank you.     
asked by 24.02.2016 / 20:19
2
answers

Copying data from one column from one table to another from the same table

Hello, I have a question. I need to copy the data from one column of the integer to another column of the decimal type of the same table, this in MySQL. Is it possible? can there be any inconsistencies in the data? And how can I do it?     
asked by 09.03.2016 / 01:48
1
answer

SQL Converter minutes to hour: minute: seconds

How to convert a value in minutes in oracle to the format hour: minutes: seconds?     
asked by 29.02.2016 / 13:40
1
answer

Sql Server Management Studio can handle any database?

I'm asking this question because I find this DBMS simply fantastic, so I'd like to use it with another database (not because I want to, but because most of the databases I have are in Mysql). Is there any adapter, plugin, or any feature that...
asked by 04.03.2016 / 15:33
1
answer

How to clear the MySQL queries cache?

How do I clear the queries cache stored by MySQL? What is the command?     
asked by 24.02.2016 / 12:48
1
answer

SQL doubt with COUNT

Hello, I have a query as below, and I have some questions regarding COUNT , I would like help to understand and solve the problem: public String getQueryPrincipal(String queryPrincipal) { return queryPrincipal = " select YEAR(ent...
asked by 20.10.2016 / 03:34
2
answers

Update multiple records together with select

I need to do UPDATE with SELECT for multiple records, today I'm with this query: UPDATE banco.ordem SET valor = (SELECT (CEILING((litros * 3.67)*100)/100) AS valor_litros FROM banco.ordem WHERE ordens = 2763) WHERE ordens = 2763 Thi...
asked by 19.10.2016 / 15:14
2
answers

Column difference and sum DATETIME [closed]

I have a table named chamado_processos with the following structure and data As you can see one of the columns in this table called dt_processo is a DATETIME field and the tp_processo column defines whether the...
asked by 10.10.2016 / 14:35
1
answer

Count equal dates select MySql

Hello, in a MySql database I have a table like this: email | data_envio a |2016-10-01 05:32:57 b |2016-10-02 09:36:56 c |2016-10-02 08:16:52 d |2016-10-03 10:36:51 e |2016-10-04 10:36:51 How do I make a sel...
asked by 17.11.2016 / 17:22