Questions tagged as 'pl-sql'

1
answer

Error using Case and Select in PL-SQL

I have this code: DECLARE BEGIN SELECT p.categoria( CASE WHEN p.categoria = 'A' THEN DBMS_OUTPUT.PUT_LINE('A') ELSE 2000 END ) FROM PRODUTO_TESTE2 p; END; Error message:    Error Reporting - ORA-06550: li...
asked by 24.01.2018 / 20:50
1
answer

UPDATE WITH CASE SQL

Is there any way I can use more than one column of the same table in a case statement in an update? for example, I have this table with these 3 lines create table produto2( codigo int primary key, categoria varchar(30), valor number(7,2)); in...
asked by 16.05.2018 / 02:03
1
answer

What is the number of decimal places of type NUMBER (12,2)?

How do I know the number of decimal places for type NUMBER (12, 2) in an Oracle database? V_FATURA NUMBER(12, 2)     
asked by 01.06.2018 / 16:28
2
answers

Update to clear entire column

I need to make a update in the bank where I clear 30,000 records, however I need to zero only the record of one of the columns. Example table: cd_product | ds_product | pr_product | dt_update This table contains the 30mil records an...
asked by 06.01.2015 / 12:30
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
2
answers

Display a message in the command output

I'm running this PL / SQL and if the condition drops to else , how to show the message to the user? declare cont integer; tabela varchar2(100) := 'PESSOA'; coluna varchar2(100) := 'NOME'; begin SELECT COUNT(NOME) into cont FROM...
asked by 13.12.2018 / 13:14
1
answer

Oracle, parameters of an Owner's procedures

In Oracle what table or view of the metadata I have in the parameters of a Procedure. My question is, does procedures have parameters with the name resembling "XPTO"? I tried the "dict" but did not find it.     
asked by 04.10.2017 / 18:09
2
answers

Read an Array or Bulk Collect as a table in an Oracle PLSQL

How do I load an Array or Bulk into a PLSQL and then read this as a table. Example DECLARE VA_ARRAY ....DEFINIÇÃO DO ARRAY VN_QTD NUMBER; BEGIN -- TABELA01 É UMA TABELA FÍSICA EXISTENTE NO BANCO SELECT * BULK COLLECT INTO VA_ARRAY F...
asked by 25.05.2016 / 18:31
1
answer

Syntax understanding pl / sql Oracle 11g

I have an Oracle PROC 11g. Inside the proc is something like this: v_prazo_subs_ans ts_odo.odo_controle_sistema.val_parametro%type; Where: v_prazo_subs_ans is a variable ts_odo.odo_controle_sistema is the table...
asked by 19.11.2015 / 20:13
1
answer

What exactly is the UTL_HTTP (ORACLE) SET_PROXY Proxy?

utl_http.set_proxy ( link '); In this example what exactly does this proxy address? I tried the internal IP and it did not work, the infra of my company said to have no "external proxy". Font Thank you.     
asked by 18.10.2018 / 01:28