Questions tagged as 'oracle'

1
answer

Databases in Oracle

I have Oracle 11g installed on my machine. In Oracle I have set up a local connection. In this local connection I have several tables. I would like in that same local connection to create another "database" where I could create new tables....
asked by 24.06.2014 / 14:40
4
answers

Concatenate 2 PHP variables in SQL statement

I am developing a PHP system with Oracle and to "optimize" an update, I would need to concatenate a variable (with values from 1 to 3) in the name of the variable I will pass in the statement. The variables come from a form, and I need to pass t...
asked by 09.09.2016 / 19:01
2
answers

Insert Oracle sequence

Error SQL Error: ORA-00911: Invalid character 00000 - "invalid character" * Cause: identifiers may not start with any ASCII character other than letters and numbers. $ # _ are also allowed after the first character. Identifiers...
asked by 25.05.2017 / 00:17
1
answer

How to use FOR to INSERT within a function in ORACLE?

I have the following function: FUNCTION PERSISTIR_CR( p_AnoExercicio TB_CONFIGURACAO_EXERCICIO.NUM_EXERCICIO%TYPE ,p_CodCR TB_CESTA_ROTINA.COD_CESTA_ROTINA%TYPE ,p_CodUG TB_CESTA_ROTINA.COD_UG%TYPE ,p_Pc...
asked by 14.04.2014 / 18:40
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
3
answers

MAX () returning multiple rows

When I run the script it does not return only the maximum value, ie the longest time, but the 3 times. SELECT P.CD_PACIENTE CD_PACIENTE ,P.NM_PACIENTE NM_PACIENTE ,L.CD_UNID_INT CD_UNID_INT ,L.DS_ENFERMARIA...
asked by 21.09.2018 / 21:49
2
answers

How to resolve the java.net.UnknownHostException error

I'm trying to install sqldeveloper and datamodeler in my Fedora 20 and I'm having problem with following error: java.net.UnknownHostException: localdomain: localdomain: Name or service not known at java.net.InetAddress.getLocalHost...
asked by 06.03.2014 / 01:28
1
answer

Can you use logic operators with CASE / WHEN?

I'm trying to use logical operators with CASE / WHEN in SQL but I'm having difficulties, I need to give a response in case the result of the operation is less than 0 and another result for when the operation is > = 0 It makes a mistake if...
asked by 12.02.2018 / 19:46
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