Questions tagged as 'pl-sql'

2
answers

What is and what is the utility of the DUAL table for Oracle?

I came across this scenario while modifying a report in the system: One of querys is returning this table as DUAL : select * from dual But in the system there is no DUAL table, and the answer they gave me was that it was a native...
asked by 27.10.2017 / 19:08
1
answer

Simple example of how to generate an XML file in Oracle

One would have a simple example of a PLSQL Procedure (or documentation location) to generate an XML file based on a Schema (xsd), the data would be generated from an SQL query. In fact files from the RPS of ANS (National Health Agency BR).     
asked by 03.02.2016 / 21:31
1
answer

Call PL / SQL procedure with collection of objects

Consider the following types: CREATE TYPE meu_tipo AS OBJECT ( meu_id NUMBER(6), meu_nome VARCHAR2(200) ); CREATE TYPE meu_tipo_tabela AS TABLE OF meu_tipo; And the following package: create or replace package pkg_test is...
asked by 03.12.2014 / 14:22
5
answers

What is the difference between comparison operators in Oracle?

In Oracle there are several operators to make comparisons of "different", such as: <> ¬= != ^= Example: Select * from tabel where nomeTabela <> 's'; Select * from tabel where nomeTabela != 's'; Select * from tabel where nomeTa...
asked by 30.10.2017 / 13:58
1
answer

Problems using Java classes in Oracle Database

I'm having trouble using Java classes a little "complex " in Oracle . When I use a simple class, as an example below: CREATE JAVA SOURCE NAMED "Welcome" AS public class Welcome { public static String welcome() { return "W...
asked by 14.08.2014 / 18:47
2
answers

PL / SQL anonymous block | ERROR PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:

I get the following error: [Err] ORA-06550: line 7, column 2: PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: I'm using a create sequence inside my BEGIN with; and / but did not resolve the error. DECL...
asked by 13.09.2018 / 16:21
1
answer

Oracle - Filter by date

I have a column dt_atualiza_log that is with type DATE in the table (it is saved in the 01/12/2011 10:10:48 format) I'm not able to filter on and of my query . I have tried in many ways, the last one: AND ma.dt_atualiz...
asked by 11.06.2018 / 18:29
1
answer

Why Oracle does not have autoincrement?

Assuming that Oracle is known to have the capabilities of the sequence table. I would like to understand why I recently implemented autoincrement in Oracle, since it was an existing feature in competitors (SQL Server, MySQL). What motivat...
asked by 01.11.2017 / 13:23
1
answer

Transaction XA does not commit changes in procedures (intermittent)

I have an EJB Stateles that monitors files that fall into a folder. When a file arrives the same is handled, a receive event is registered in a central database and the file is inserted into a destination database: @Override @Asynchronous @Tra...
asked by 04.11.2014 / 17:54
2
answers

How do I update multiple rows in a table after it has changed?

CREATE or REPLACE TRIGGER TG_ATUALIZA_BLOQUEIO AFTER UPDATE ON pcclient FOR EACH ROW begin if :NEW.BLOQUEIO = 'S' THEN UPDATE PCCLIENT SET BLOQUEIO='S' where codcliprinc=:OLD.CODCLIPRINC; END IF; end TG_ATUALIZA_BLOQUEIO; Explain...
asked by 16.06.2015 / 19:34