Questions tagged as 'sql'

1
answer

Error # 1241 MySQL subquery

How to create two subqueries in MySQL ? effectively and optimized. The current code throws me the error #1241 - Operando debe tener 1 columna(s) from the phpMyAdmin . The first subquery calculates the total number of availab...
asked by 16.01.2018 / 23:50
1
answer

Empty argument. .Net and SQL

The following function gives me the following error: System.ArgumentNullException: 'El valor no puede ser nulo. Nombre del parámetro: dataTable' I executed the Query, directly in SQL and I had an answer. So I do not understand why it does n...
asked by 05.12.2017 / 15:29
1
answer

Conflict of operand types: time is incompatible with numeric sqlserver

I'm doing a stored procedure to add a sale but I do not have this error Conflict of operand types: time is incompatible with numeric This Code is the same CREATE procedure agregarventa( @idusuario int, @idcliente int, @fecha date,...
asked by 01.04.2018 / 06:54
1
answer

Problem with SQLite query

the query I want to make is about the selection of a song with certain specifications, to make a playlist, it is generated as the songs are played, the query is something like selecting the next song. In the table I have a logical data like, "re...
asked by 20.11.2017 / 13:34
2
answers

fix the date of the previous day at 00:00 hours

I need to get MySQL the date of the previous day at 00:00 hours. For example if today is 21/11/2017 11:57:00 , the resulting date should be% 20/11/2017 0:00:00.000 . In sybase I take it out this way SELECT dateadd (dd, 0,conv...
asked by 21.11.2017 / 12:18
1
answer

Repeated rows in MYSQL query

Good I have a problem, it turns out that I have 3 tables that contain information about the event, another with the 'materials' (services) for that event and an intermediate table that generates me the N to N, when I want to show the event with...
asked by 21.12.2017 / 04:56
1
answer

Subtract two sql columns

I have a table in postgresql, the structure is as follows: clientes --------------------- nombre apellido pago deuda saldo pendiente The point is that I want to subtract the fields pago - deuda and the result that appears in s...
asked by 25.05.2018 / 01:09
1
answer

ORA-01008: not all variables bound

I'm doing a query to a database using php, the case is that it gives me    error ORA-01008: not all variables bound And I do not know how to solve it. If you can help me, I appreciate it. The function that I am executing is: function co...
asked by 21.08.2017 / 20:09
1
answer

Edit field from a date in SQL Developer (DB2)

I need to update the value of one field for another from a certain date ( 5/04/2017 ). It is a DB2 type database. I am using this sentence: UPDATE tabla SET campo='valor_nuevo' FROM tabla WHERE (campo='valor_viejo' AND fecha>=DATE(...
asked by 27.06.2017 / 09:39
1
answer

Specify language with MYSql - STR_TO_DATE

I have the following problem. I need to parse a text to a date with MySql . The problem is that the text to be parsed is of the style: " 03-ene-17 ". I used the STR_TO_DATE function in the following way: STR_TO_DATE('03-ene-17', '...
asked by 18.07.2017 / 10:09