Questions tagged as 'oracle'

1
answer

How to remove duplicate lines while keeping other columns

In the example below, I'm interested in removing duplicates of the rows in columns title and time without worrying about the other columns. In the example below I'm interested in having the query return rows 32, 34 and 36 and al...
asked by 04.11.2016 / 17:26
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
4
answers

How to select "1" or "2" depending on the column value in PL / SQL?

I have a column in my TIPOCLIENT table. In it appear CPF for Individual and CNPJ for Legal Entity. I would like the moment SELECT to come "1" to CPF and "2" to CNPJ. How can I do this?     
asked by 05.03.2014 / 12:40
2
answers

Tablespace and data files in Oracle

Is a tablespace a data file that stores multiple tables, such as a zip file? What is the relationship between tablapace and data file?     
asked by 11.08.2017 / 23:10
3
answers

Retrieve longer and shorter time-bound dates

Within a table containing the data_inicio , data_fim , hora_inicio , hora_fim columns, you need to identify the following occurrences within a recordset: the lower start date, the higher end date, the start time lower an...
asked by 06.05.2015 / 22:30
2
answers

Regular expression with termination specifies to bring 3 first characters

I'm trying to do a regular expression in Oracle with the following requirement: Finish with a specific letter, if you have that letter in the middle do not search. Return the first 3 digits of the string. To solve the first problem I ca...
asked by 15.03.2017 / 14:04
2
answers

Syntax difference between database

What is the difference, in the syntax, of the following databases, for a simple query, of type: SELECT * FROM tabela WHERE id = '1' ORDER BY nome GROUP BY nome LIMIT 1 Or, what do they differ in syntax in general? Or is it all the same?...
asked by 05.11.2017 / 04:07
1
answer

Procedure oracle to copy data between tables

I need to do a procedure that copies from my table TAB_FORNECEDOR, everything in it and go to table TAB_FORNECEDOR2. I need to make a cursor with a loop, a delete with commit first of all, can you give me a light on how to mount my procedure?...
asked by 16.12.2014 / 18:52
1
answer

Execute procedure oracle

I created this procedure but I can not execute it. I have the following error when trying Execute:    PLS-00306: Incorrect number of argument types in call to 'SP_CARTAO' CREATE OR REPLACE PROCEDURE SP_CARTAO ( P_ID IN INT , P_ID_CAR...
asked by 01.12.2014 / 22:14
1
answer

Grouping and Summing in Oracle

I have a Customer registry ID NOME GRUPO 2033 JOAO FORNECEDORES 2044 MARIA MANUTENCAO 2055 JOSE FORNECEDORES And I have a purchase record made by each customer ID_CLIENTE VALOR_COMPRA 2033 4.000 2033 1.130 2044...
asked by 05.05.2017 / 15:14