Questions tagged as 'stored-procedure'

1
answer

Stored procedure does not run completely when I call it from PHP

I'm having a very serious problem because it does not let me continue with the project I'm developing. The logic is as follows, I upload a file of Excel to the server (from a web system) then I read the data that is in the file of E...
asked by 22.04.2016 / 16:11
2
answers

Get the largest data from different fields - SQL

I have a table with 'STOCK_TIENDA1'-' STOCK_TIENDA2 'AND' STOCK_TIENDA3 ', I need to take the stock of the store that has the most value and pass it to a new variable 'SHOP_MAYOR' would be something like this: I thought of something lik...
asked by 28.06.2018 / 21:35
2
answers

perform query with a condition in mysql

I have a person table and a session and in the session table I have the category column, so I want make a query that ignores people who are admin I have tried these codes and I have not obtained the result I want. create procedure li...
asked by 12.03.2018 / 02:53
2
answers

SQL error There is already an object with the name

Already review this question and it's not really what I'm looking for. You see, I am generating a Sotred Procedure whose query becomes a sales report. The condition is that, when it comes to specific dates, you must select from some tabl...
asked by 26.10.2017 / 19:04
1
answer

Select and then Insert

I need to do a procedure stored in MySQL: I have a select where I rescue data: select columna1, columna1, columna1, columna1, columna1 from TB1 and these data taken I need to pass them to a new table ( TB2 ): Talves is as simple...
asked by 12.09.2018 / 18:25
1
answer

last question id inserted (mysql)

Hello, good morning, everyone. I need to make an insert to an X table and immediately make an insert in an Xx table. The insert to the first table works without problems, but the particularity that the second insert has as key the ID th...
asked by 24.08.2018 / 15:52
1
answer

Like statement with parameters

I have the following procedure: create procedure buscar( in producto) begin select nombre from producto where nombre like'%'+producto+'%' end but I get an error in the like try using create procedure buscar( in producto) b...
asked by 27.06.2018 / 12:43
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

How can I save the result of a query in an array using the MySQL stored procedure?

I want that when executing this query SELECT tabla1.campo1 From tabla1, tabla2 Where tabla1.campo1 = tabla2.campo1 Group By tabla1.campo1; Which will give me for example 600 records, save the 600 recor...
asked by 05.08.2016 / 20:40
1
answer

Problem calling procedure stored from Java

I have a problem trying to access a specific procedure stored in SQL Server from Java . The stored procedure receives a XML as a parameter, and returns another. An example of a call is the following: DECLARE @xml AS NVARCHAR(2000) DECLARE...
asked by 04.10.2018 / 11:45