Questions tagged as 'oracle'

2
answers

function snippet failed to read table

I'm developing a function that read from one table and inserts into another: The error is: Warning: Function created with compilation errors. I've removed the select line and it works. So, the error is in it. create or replace function F...
asked by 06.10.2018 / 02:26
1
answer

Use variable in an execution

I'm creating the following pl: declare cont integer; tabela varchar2(100) := 'TABLE_TESTE'; col varchar2(100) := 'TESTE'; begin SELECT COUNT(*) into cont FROM USER_TAB_COLUMNS WHERE TABLE_NAME = UPPER(tabela) AND COLUMN_NAME...
asked by 03.10.2018 / 21:11
0
answers

Error in query - Inconsistent data NCLOB

Hello, I'm trying to perform a query on an Oracle database and it is returning an error    ORA-00932: Inconsistent data types: expected - got NCLOB   00932. 00000 - "inconsistent datatypes: expected% s got% s"   * Cause:   * Action: T...
asked by 03.10.2018 / 20:52
1
answer

Field to number or rank different records - Oracle

I have a problem that is as follows: Knowing that a service can have several exams, I need to number the exams in order to know the first, second, third ..., for each service. Example: LINHA ATENDIMENTO SEQ_EXAME 1 100...
asked by 16.10.2018 / 12:55
1
answer

select picking up the items that are in the current day and time

I want to pick up the items that are smaller than the current date and time, but when I run select it gives the error message, not a valid month. In the database the date is set as follows, '25 / 09/18 10:23 '. SELECT * FROM v_tpl_acompanhamen...
asked by 25.09.2018 / 17:24
0
answers

Foreign characters being inserted into the Oracle insert

I have an oracle XE database, I want to import scripts into sql to fill tables, however, characters with accents and Ç for example get strange characters for example. In this example insert: Insert into PESSOA (ID, TIPO, CPF_CNPJ, RAZAO_SO...
asked by 18.09.2018 / 04:29
1
answer

Subquery in Oracle SQL

I have a code that aims to return open invoices from a customer in a specific time period. But I want to add a field that displays the total number of invoices, regardless of the debit period. The code looks like this: SELECT fatura.num...
asked by 24.09.2018 / 14:21
1
answer

LISTAGG returning repeated values

Hello everyone. Good afternoon. I have a query that I did concatenating multiple records using a given key. However, it brings some repeated values as a result. Here is an example of a query: SELECT PEH.PN, LISTAGG (PEH.AC_TYPE, ',') WIT...
asked by 13.09.2018 / 21:56
1
answer

Scheduling jobs using Oracle scheduler

Good morning, good afternoon and good evening. Lords could help me with a problem with dbms_schedule from oracle. I need to create a JOB that starts every day at 10pm and stops at 4am in the morning, but it has to be run every 1 hour. B...
asked by 05.09.2018 / 01:09
1
answer

Field Number (3.0) in Oracle database for Java

I have a table in an Oracle 11g database with a field of type NUMBER(3,0) In a Spring project, I have the following repository: @Repository public interface TipoPropriRepository extends JpaRepository<TipoPropri, Byte> { } Th...
asked by 23.08.2018 / 22:08