Questions tagged as 'stored-procedure'

1
answer

Sort values of the columns from largest to smallest in an array and save each ordered value in a new variable

The data in the blue box exists, the data in the red box must be registered, It is to order the (data from the blue box) from largest to smallest and pass them to the column of the red box, according to their order. What I have done...
asked by 30.07.2018 / 23:13
1
answer

How to take the variable with the oldest date - SQL SP

I have a stored procedure, which must take from a set of variables, the one that contains the oldest date in the field DATE_CREATION a product code is in different tables, I must take the data from the table with the oldest date and pass it t...
asked by 19.06.2018 / 17:33
1
answer

MYSQL procedures

delimiter // create procedure elimdato(in id_emple int(6),cp varchar(5)) begin DELETE FROM empleado WHERE cp=cp; end // call elimdato(1,40855); At the time of executing this procedure, I delete all the information of the table used, I woul...
asked by 31.05.2018 / 03:00
1
answer

Infinite loop of mysql

I have to take out a stored procedure, to simplify fractions (divide by the same numerator and denominator number). However, when I run the script it stays running for a while and the MySQL connection is cut off. My code is as follows: deli...
asked by 29.11.2017 / 00:25
1
answer

How do I execute a procedure in laravel?

What kind of friends do I come to ask for your help, I am working on laravel 5.4 for some issues I have to execute a stored procedure that performs an insert and returns the id of the saved record, my question is how do I receive the id that ret...
asked by 20.10.2017 / 06:17
1
answer

How to know if a stored procedure that is executed within another procedure, returns an error, exception or empty from C #?

In this code I show only one (EXAMPLE) where I have a Stored Procedure and within it I get data from another Procedure, How can I capture the value that returns this procedure or the output values (sp_SearchTurn) before getting the one that re...
asked by 11.12.2017 / 20:48
2
answers

Use result of SELECT as table name for another SELECT

I have a table of the following style Father |----|------- |-------| | id | precio | tabla | |----|------- |-------| |1 | 50 | sxt | |----|------- |-------| |2 | 45 | ext | |----|------- |-------| then I have other tables...
asked by 29.08.2017 / 00:29
1
answer

Help with Microsoft.SqlServer.Management.Smo StoredProcedure C #

I am programming an application in C # to extract the stored procedures from a database and generate the corresponding scripts. The problem I get is that when I get the StoreProcedure objects, it brings me the SystemStoreProcedures as well, I ha...
asked by 22.06.2017 / 23:40
1
answer

Update field with a specific condition with trigger

I have the following situation I would like an idea of the condition that could be put in a trigger so that when you insert an ISR422 for example 1.1 the date is updated automatically of the one that has an isr422 = 1, that is, both would have t...
asked by 20.07.2017 / 22:55
2
answers

Return a data from a stored procedure in Oracle

I have this stored procedure: create or replace procedure spu_modificarTrabajador ( tnombre varchar2, tapellido varchar2, tid_cargo number, tdireccion varchar2, trut varchar2,tsueldo number, tcorreo varchar2, tcomuna number) is begin updat...
asked by 02.07.2017 / 08:52