Questions tagged as 'procedure'

1
answer

Error ORA-01460 in Oracle

I have the procedure below: PROCEDURE GRAVA_(P_IMEI_DISPOSITIVO IN NVARCHAR2, P LONG, P_DET LONG, RETORNO_OPERACAO OUT VARCHAR2) In th...
asked by 20.01.2015 / 14:04
1
answer

Stored Procedure with low performance

I have a problem with Oracle, where I have two procedures that are executed one after the other. Where in the first procedure , I have a cursor that makes insert in a table. This insert has approximately 30 million records , which...
asked by 21.10.2014 / 15:09
0
answers

Migrating from Firebird to MySQL

I am migrating a project in Firebird to MySQL, I have a difficulty in converting a procedure, I would like any tip in how to proceed, below the procedure in FIREBIRD. CREATE PROCEDURE EXECUTA_INATIVA_TABELAS ( OPERADOR VARCHAR(20), ALT...
asked by 09.01.2018 / 14:16
1
answer

Spool task for the server

Good evening! Personal, currently in my work, I have to generate multiple .txt files to be exported to the bank of another company. I flip this in hand and that sucks, every day I run, wait to send and everything. I tried to do the spoo...
asked by 11.11.2015 / 21:57
0
answers

Cursor stored procedure Mysql

I'm inside a cursor that has 10 rows of result. 2 rows perpendicular to a number. example: 1,2 = 1, 3,4 = 2, 5,6 = 6, 7,8 = 9 , 9,10 = 3. How do I add the values that match the same number inside the cursor? This is my FETCH...
asked by 23.09.2015 / 19:24
3
answers

Error in procedure "Must declare the scalar variable"

When I run the following Procedure, SQLServer gives the error:    error Must declare the variable scalar "@VDIAPARALISADO". Procedure: BEGIN SELECT @VDIAPARALISADO = COUNT(F.DATA) FROM ED_FERIADO F WHERE F.EDEMPRESA_ID = @PEDEMPRESA_ID...
asked by 28.10.2014 / 12:57
2
answers

Create total sales procedure (value) per customer

I need to make a procedure that instantiates the cli_TotalCompras column of the client table with the customer's total (in value). In the vendaProduto table I have the value ( vpr_ValorUnit ), the quantity ( vpr...
asked by 26.10.2016 / 00:22
1
answer

Do a SELECT multiple tables and save in a worksheet

I'm trying to do a SELECT with multiple tables, where I have a product with your information, and I have another table structure to be able to add an extra field and their respective information. What I tried to do was this: SELECT p.codigo...
asked by 30.07.2018 / 20:13
2
answers

Make selection from the results obtained from the same

Good afternoon, I have the following table .. *eventos* ---------------------------------------- | id_evento | id_projeto | nome_evento | ---------------------------------------- I need to do a procedure as follows: "Select events w...
asked by 23.10.2017 / 22:38
1
answer

SQL Exception Oracle - Update and Insert

I have a question regarding a procedure that I'm doing oracle database. A little explanation for what I'm doing: I'm reading data from a table, and playing them on a cursor, after playing the cursor, I set it to a record, in the procedure I have...
asked by 02.12.2016 / 15:17