Questions tagged as 'pl-sql'

1
answer

PL / SQL procedure calls

Studying PL / SQL I came across the following code: CREATE PROCEDURE incluir_segmercado(p_id IN NUMBER , p_descricao IN VARCHAR2) IS BEGIN INSERT INTO segmercado values(p_id, UPPER(p_descricao...
asked by 13.11.2018 / 02:27
1
answer

Call Java class inside Oracle

I would like to know if it is possible to call a Java class within the Oracle database. I have already installed the JVM inside the Oracle server, but I can not compile the Java class. Does anyone know of any way I can do this?     
asked by 13.08.2014 / 16:44
2
answers

PLSQL know the amount of records inside a "for cursor"

Inside the example below: Begin For r in (select * from tabela) Loop ..... ; End loop; End; Is there any direct way to know within the loop how many records the cursor has?     
asked by 23.08.2014 / 13:13
2
answers

Remove Oracle Special Characters

Good morning, I have a query here made in Oracle where in one of the records is bringing a string starting with quotation marks, does it have any oracle function to remove only the quotation marks at the beginning and end of a string? Than...
asked by 09.11.2017 / 12:32
2
answers

Calculation for year "turn" with trigger

How to treat the trigger below so that operations performed between 11/21/2016 and 12/20/2016 return date 01/20/2017 instead of 01/20/2016. p> DECLARE P_COUNT NUMBER(5); DIA_VENDA VARCHAR(2); MES_VENDA VARCHAR(2); MES_...
asked by 10.11.2016 / 18:52
2
answers

Query product mix oracle

I made an indicator here in the company where you ready product information, quantity sold, average value, etc. This in a period of time. Now I need the following information: What is the product that most often appeared in the same sales...
asked by 19.05.2016 / 18:31
1
answer

How do I know if a column exists in a table in Oracle?

I'm trying to add a new column to a table in Oracle, and I want to know if it already exists or not. I have tried something like this: IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'minhaTabela'...
asked by 30.01.2018 / 14:22
3
answers

How to declare a cursor type variable in PL-SQL?

I have a course: Cursor Pessoa is Select nomeFuncionario From empresa; -- Variaveis para uso da rotina variavel How would the variable be?     
asked by 31.01.2018 / 21:08
1
answer

Select returns 2 rows per GROUP BY account

The code below returns the number of dialed and the number of answered, but when adding the CASE to bring me the number of faults it separates the line from the answered ones from the line of the defaulters, this all on account of grou...
asked by 11.05.2018 / 15:36
1
answer

How to declare "nullable" parameters in an Oracle procedure?

I need my procedure to accept null values in some parameters of type Number. How do I do this in PL / SQL? Currently: PROCEDURE SP_EDITAR_QUADRO( P_IDQUADRO IN NUMBER, P_IDFUNC IN NUMBER, P_IDTRAB IN NUMBER ); ... I need the...
asked by 16.11.2017 / 18:43