Questions tagged as 'oracle'

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
2
answers

ORA-01036: illegal variable name / number

I have a small problem with my application. The INSERT routine gives me its error:    ORA-01036: illegal variable name / number Remembering that the bank is Oracle and the application in C #. Here is the code that generates the error:...
asked by 01.08.2014 / 15:55
1
answer

Oracle Character Substitution

I have a field in my table with a string like this: 80,82,45,80,82,79,88,73,77,79,32,65,32 I want to replace the comma ( , ) with commas in single quotation marks ( ',' ), to stay: 80','82','45','80','82','79','88','73','77','79','32','65...
asked by 25.07.2018 / 23:12
1
answer

Problem in SQL selection

Because even if I filter to return only the fiat manufacturer, does it return other values? SELECT FABRICANTE, MODELO, VALOR_DIARIA FROM VEICULO WHERE VALOR_DIARIA = (SELECT MIN(VALOR_DIARIA) FROM VEICULO WHERE FABRICANTE = 'FIAT') Re...
asked by 07.04.2018 / 01:49
1
answer

How to use LIKE with OR in Oracle?

I have the following table: CREATE TABLE DEPENDENTE ( IdDependente number(6), Matricula number(6), Nome char(50) NOT NULL, dtNascimento date, constraint pk_IdDependente PRIMARY KEY(IdDependente...
asked by 27.09.2017 / 17:55
2
answers

How to add foreign key with constraint and alter table in Oracle?

I have the following tables: Create table OS( nro_os number(4), data_os date , hora_os number(4) ); Create table cliente( cod_cliente number(4), nome_cliente varchar(12), endereco_cliente varchar(20), telefone_c...
asked by 29.09.2017 / 19:50
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

Regular Expressions in Oracle

'Select from the CITIES tables only records with compound names separated by a single space' TABLE CIDADES ID CIDADE 01 SAO PAULO 02 RIO DE JANEIRO 03 SAO CARLOS 04 TAUBATÉ 05 SÃO JOSÉ DO RIO PRETO Query can only return TABLE CIDAD...
asked by 31.03.2017 / 14:54
1
answer

How to do a percentage calculation in Oracle?

I can not make a Select that can do 1 IPI calculation in Oracle. Table VS01 Fields: PD = 001 TP = 100 reais IPI = 15 Select PD,TP,IPI, TP * IPI% AS TOTAL <<< aqui que não consigo executar From VS01 PD || TP |...
asked by 28.03.2017 / 14:51
2
answers

Permissions for an Oracle USER

I am creating an Oracle user for my bank, after defining the basics I tried to execute my script to create the tabelas and sequences , however, the tool returned an error saying it lacked permissions. The error: Relatório de err...
asked by 20.07.2017 / 23:37