Questions tagged as 'stored-procedures'

0
answers

Executing a Procedure within a Function or Select

I need to register every time a SELECT is run on my system, if the user is logged in, this process would be done inside my ERP that allows this type of Customization, however I tried within SELECT to insert a function to call a procedure that do...
asked by 25.04.2018 / 20:31
0
answers

How to know the number of rows of a cursor type sys_refcursor - Oracle

I have a procedure Oracle which has a series of input parameters (IN) and an OUT parameter of type SYS_REFCURSOR . I created a dynamic sql that sets the conditions of where based on the input parameters and then I simply exe...
asked by 12.04.2018 / 22:22
0
answers

Compare values of two tables in a Procedure

I have an application that lists in a grid files that are registered in the table    SCF_Process Documentation However, now I need to list only if this file also exists in the table    SCF_ARQUIVO_UPLOAD What the application does i...
asked by 24.01.2018 / 19:29
1
answer

SQL Error (1093): You can not specify target table 'import2016' for update in FROM clause

I'm running this PROCEDURE, and it returns this error! BEGIN SET @cont = 0; REPEAT SET @sqlstring = "UPDATE import2016 SET coluna4 = (SELECT coluna4 FROM import2016 AS a WHERE a.coluna2 ='' and a.coluna4 like'%/%' L...
asked by 17.01.2018 / 21:11
0
answers

Parameters of entry in Stored Procedure with more than one value

I need to do a stored procedure in oracle where I have 5 input parameters and 1 output parameter that will be a cursor (recordset). The problem is that each input parameter can receive more than one value, that is, a list of values. These receiv...
asked by 11.01.2018 / 12:44
2
answers

Generate random name in MySQL - Stored Procedure

Good evening, is there any way to generate random names with stored procedures in MySQL? I have the following table:    ALUNO (id: int [PK], name (varchar (100)), age: int, Cr (float)) I need this table with 10mil entries popular. To gene...
asked by 20.05.2016 / 03:23
1
answer

More than one cursor in procedure Mysql

Do I need to execute more than one cursor in the same procedure? Is this possible? begin DECLARE done INT DEFAULT 0; declare v_dia, v_rotina int; declare v_hora time; declare v_saldo, v_valor decimal(5,2); declare v_flag tinyint; declare v_id...
asked by 04.12.2017 / 13:36
1
answer

How to update a field from a Database table using a Stored Procedure?

I basically have a database table, which has a field called DESCRIÇÃO and the table is called Tabela123 I have 10 records in this table, and in the DESCRIPTION field I have the sentences: Hello, are you ok? goodbye and thank...
asked by 08.08.2017 / 13:00
1
answer

Consuming webservice per SQL Server procedure?

I'm using sql server 2016 to consume webservice per store procedure. I have a webservice in JSON returning the following: [{"nome":"Rebecca","email":"[email protected]","ra":"12345"},{"nome":"Caroline","email":"[email protected]","ra":"23...
asked by 21.07.2017 / 13:55
1
answer

Rename part of the parameter names of a procedure

I have some procedures where parameter names start with: "p _" . Is it possible to change in a unique way and code all the names of all procedures that start with this abbreviation by: "abc _" for example? Procedure: CREATE DEFINER = '...
asked by 31.07.2017 / 19:05