Questions tagged as 'sql'

1
answer

SQL- If the rows add 1 in a group add the total

Good morning friends, I hope you can help me, I'm trying to make a query that depends on the category and if the sum of one column results in 1 the total is added. Any contribution can help me:) example |---------------------|--------...
asked by 08.02.2018 / 22:50
1
answer

In clause where does not discriminate a subtraction

Hello, I have the following query. It is quite extensive but it is more or less like this Select CantidadEmpacada, CantidadFacturada FROM PedidoEmpaque WHERE (CantidadEmpacada - CantidadFacturada) > 0 throws me 2 rows but when the su...
asked by 12.03.2018 / 15:24
1
answer

Store image in MySQL database [closed]

I find the situation that, I have to show through a query to a MySQL database in the cloud an image in an android tlf, through a PHP file. The doubt is that I do not know which is the best or easiest way to do it, if saving the image as a blo...
asked by 02.02.2018 / 12:17
2
answers

Remove the first name from each SQL SERVER office-box

Good, I have a little problem to see if you can help me. I start from the following query SELECT Caja, Oficina, DNI, NombreCompleto, Importe FROM miTabla WHERE Importe > 50 and Caja LIKE '0%' What they ask me now is to group it so tha...
asked by 01.02.2018 / 12:41
2
answers

Limit INT data types (only positive)

Good afternoon. I was searching the internet and found nothing. What I want to do is to limit all the INT fields to accept only the positives. Is there any SQL function to do this? You could put an IF that validates that, but I do n...
asked by 05.02.2018 / 18:56
1
answer

Use the ORDER BY in a select with ROLLUP

I have a Stored procedure that brings me the following information: Zone (used as a grouper in the rollup) Store Received Orders Accepted Orders Denied Orders Percentage of acceptance This information, my user wants to con...
asked by 06.02.2018 / 19:44
1
answer

Eclipse - Reports BIRT - Aggregation

Greetings, if someone works with the Reports for Eclipse BIRT plugin, I have a question about the functionality of Aggregation , its uses are not clear to me, that is to say all its potential. I know that it can be used in a table to add a fi...
asked by 06.02.2018 / 13:37
2
answers

How to mix SQL queries

I have the following tables: series_trailers : ID EPISODEID CONTENT AUTHOR ----------------------------- 1 122383 url1 Peter 2 9999 url2 Ana 3 923822 stuff Jhon 4 122384 url3 Drake series_episodes :...
asked by 27.01.2018 / 22:10
2
answers

Error making an insert with an empty field mysql

I have a problem with inserting data into a table. The case is that when doing the insertion I do not take the field '' as a value null or 0 I just skip error. I have already checked the table and the field that in partic...
asked by 05.02.2018 / 12:54
1
answer

I have problems in my laravel 5.5 project

This error appears:    SQLSTATE [42S22]: Column not found: 1054 Unknown column 'clients.deleted_at' in 'where clause' (SQL: select * from clientes where clientes . deleted_at is null) Generate my controllers and...
asked by 07.02.2018 / 17:28