Most voted "oracle" questions
Oracle Server is a relational DBMS (Danco Data Management System), created by Oracle Corporation. Do not use this tag for other Oracle owned Sgdbs servers (for example Mysql, Timesten and Berkeley DB).
Learn more…1,134 questions
Sort by count of
-
3
votes1
answer1319
views"ORA-01756: quoted string not properly terminated"
Speak guys, good morning, I’m with a legacy code and I’m having the following difficulty: When I try to check any word that has simple quotation mark I get this error ORA-01756 Ex: Raphael me'lo now…
-
3
votes1
answer1355
viewsPassword or invalid user when logging into oracle database (ORA-01017)
Good morning, everyone, I need to set up an environment for a course. For this I installed the Oracle database and SQL Developer. In the oracle database I have the SYS user working perfectly. The…
-
3
votes1
answer206
viewsOracle TO_DATE is converting wrong dates from day 07/01/2020
The TO_DATE function of the Oracle database is doing the following conversion wrong: The two lines are exactly the same. It makes no sense (for me), the Oracle convert right the date of Tuesday and…
oracleasked 4 years, 10 months ago Rick Wolff 569 -
3
votes3
answers231
viewshow to insert a select command into the BD using c#?
I wanted to have a table of select commands in the bank, and they were read in a combobox. I have a textbox where I write the command to be executed by the bank, a button for it and a combobox with…
-
3
votes1
answer106
viewsRecursive query to find the Parent item
I have the following question below when making the query in Oracle 10G. I have the table med_item_avaliar that has in its structure items that reference other items within itself (Parents and…
-
3
votes2
answers245
viewsDoubts in the modeling of the Database
Guys, I have the Product, Ingredient and Sale table. The product contains several ingredients, e.g.: Suppose that the product is a mixture, it contains 1 bread and 2 Ingredient cheeses, this…
-
3
votes1
answer177
viewsHow to compare select lines with subselect output?
I have a table with record of activities. So I find cases like the example below: |codigo| etapa | - - - |abc123| 1 | |abc123| 2 | |abc123| 3 | |xyz987| 1 | |xyz987| 2 | And I need to list the code…
-
3
votes1
answer238
viewsTable creation error (ORA-00904)
I don’t know if it’s my glasses that are in trouble, but I can’t see where I’m going wrong. If you can help me. I read that the mistake could be happening by the way I’m declaring mine PRIMARY KEY,…
-
2
votes1
answer797
viewsOracle occurs connect problem Identifier is Too long
I have the following problem, first setting up my PC. OS: Fedora 20 PHP 5.5 Oracle Instant Client: 11.2.0.4.0 I try to connect via file settings tnsnames.ora and the following error occurs…
-
2
votes5
answers508
viewsQuery error with WHERE AND COUNT on Oracle. "SQL command not properly ended"
I have the following query: INSERT INTO TB_CLASSIFICACAO_UG (COD_CLASSIFICACAO_UG, TXT_DESCRICAO, IND_ATIVO) VALUES (SEQ_COD_TB_CLASSIFICACAO_UG.nextval, 'TESTANDO', 1) WHERE (SELECT…
-
2
votes1
answer928
viewsHow to check if my one-column record (FK) is present in other tables?
I want to delete a record, but sometimes the oracle complains: SQL error: ORA-02292: Integrity Constraint (SGR20_HOMOLOG.TB_CONFIGURACAO_EXERCICIO_T436) violated - Child record found 02292. 00000 -…
-
2
votes2
answers6990
viewsCASE error in ORACLE’s WHERE
I am trying to use the case function in the Where clause in Oracle but this part of the query generates an error. It is possible to use this function to determine which Join will be made? AND (CASE…
-
2
votes1
answer1279
viewsHow to use FOR for 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…
-
2
votes1
answer263
viewsConditional to print in PL/SQL
I have a report developed in Sybase Infomaker (similar to Crystal Reports) that displays two pages, but I need to print the second page only if there is a calculation. On the second page is…
-
2
votes3
answers22309
viewsIF condition inside a WHERE - ORACLE PL/SQL
See below for details of the problem in question: CREATE OR REPLACE PROCEDURE NOVODIA.PRC_PACIENTES_INATIVOS_95 ( --PARAMETROS IN_CPF IN VARCHAR2, IN_CARTAO IN VARCHAR2, OUT_CURSOR OUT SYS_REFCURSOR…
-
2
votes1
answer175
views -
2
votes1
answer92
viewsDatabases in Oracle
I have Oracle 11g installed on my machine. In Oracle I have configured a local connection. In this local connection I have several tables. I would like in this same local connection, create another…
-
2
votes1
answer177
viewsOracle user is a reserved word, can generate problems ?
There may be some problem if an Oracle user (USER) is a reserved word ? In case : MAX
-
2
votes1
answer1144
viewsCalling Java class inside Oracle
would like to know if it is possible to call a Java class inside the Oracle database. I was able to install the JVM inside the Oracle server already, but I cannot compile the Java class. Does anyone…
-
2
votes2
answers3093
viewsPLSQL know the amount of records within a "for cursor"
Inside the example below : Begin For r in (select * from tabela) Loop ..... ; End loop; End; Is there any direct way to know inside the loop how many records the cursor has ?…
-
2
votes1
answer4343
viewsQuery works in the database but not via code
using (var cnx = new OleDbConnection(new AdministradorDAO().conexao)) { var sql = @"insert into usuarios(matricula, nome, senha, nivel, maleta, email) values (@matricula, @nome, @senha, @nivel,…
-
2
votes1
answer388
viewsStored Procedure with low performance
I’m having trouble at the Oracle, where I have two procedures that run one after the other. Where in the first procedure, I have a cursor that does insert on a table. This Insert has approximately…
-
2
votes2
answers3113
viewsObsolete PECL/PHP PDO_OCI extension. How to proceed?
I need to install the pdo_oci extension of PHP to work with Oracle database, via PDO. However, I checked that the extension available via PECL is obsolete and will no longer be maintained. From what…
-
2
votes2
answers29844
viewsConvert date to dd/MM/yyyy ORACLE
How to format sysdate for dd/MM/yyyy on Oracle 11g?
-
2
votes2
answers3466
viewsSelect all references to a given table (Foreign key)
I need a way to select all the Foreign key of a particular pk. In other words, I want to catch a determined Primary key and select all the Foreign Keys that "point" to her. Preferably I want to get…
-
2
votes1
answer1201
viewsDifference between varchar2 and nvarchar2
In Oracle, there are two types of data that I can use to represent texts, the varchar2 and the nvarchar2. What is the difference between these two types of data?…
-
2
votes2
answers634
viewsChange in audit in Java+Spring+Oracle application
I am tasked with changing an audit implementation in an application in which I work. The requirement of the audit is to know the history of changes, and execution of certain tasks by a given user.…
-
2
votes1
answer1443
viewsORA-01460 error on Oracle
I have the trial below: PROCEDURE GRAVA_(P_IMEI_DISPOSITIVO IN NVARCHAR2, P LONG, P_DET LONG, RETORNO_OPERACAO OUT VARCHAR2) In the P and P_DET parameters I receive strings with XML data, and inside…
-
2
votes3
answers633
viewsHow to return the last query ID
I’m working with an Oracle bank I have two tables: Table Student: IDALUNO IDMATRICULA FASE Test Table: IDTESTE IDALUNO IDMATRICULA TESTE STATUS I also have a view that gives me the information of…
-
2
votes2
answers923
viewsMerge table using a Subquery
I have 3 tables: inscricaoaluno, inscricaoescola and prova, with the following structures: PROOF IDPROVA | DESCPROVA | TYPE | QTDEMAX ENROLLED TEACHER | SCHOOL(IDESCOLA) | DTINSCRICAO | IDPROVA…
-
2
votes2
answers10059
viewsRead or write attempt in protected memory
I have an application in C# connecting to the database Oracle. For this the application makes use of the Nhibernate (a very old version) and Castle Activerecord. This always worked, however, now…
-
2
votes1
answer759
viewsOracle PLS-00103 error while doing INSERT
I cannot understand this Oracle syntax error: SET SERVEROUTPUT ON DECLARE v_idEmp INTEGER: = &numero_funcionario; v_nome VARCHAR(30): = '&nome'; v_sobrenome VARCHAR(30): = '&sobrenome';…
-
2
votes1
answer187
viewsINNER JOIN performance in SQL
Hello, would anyone know me if there is any significant difference in performance in the two ways of doing INNER JOIN below? Way 1: SELECT column_name(s) FROM table1 INNER JOIN table2 ON…
-
2
votes2
answers379
viewsError group by Oracle
When I try to make this group by in oracle it returns me message saying that this is not a group by expression SELECT produto.cd_produto, produto.ds_produto, est_pro.cd_estoque, estoque.ds_estoque,…
-
2
votes1
answer9153
viewsSQL Convert minutes to minutes:minutes:seconds
How to convert a value in minutes in oracle to the time:minutes:seconds format?
-
2
votes4
answers10668
viewsHow to create a Boolean column on Oracle?
As far as I know, Oracle does not provide a valueType of the kind Boolean. I am working a short time with Oracle and would like to know what is the best solution to "simulate" a true/false value in…
-
2
votes1
answer185
viewsCan Sql Server Management Studio handle any database?
I am asking this question because I find this DBMS simply fantastic, so I would like to use it with another database (not because I want to, but because most of the databases I have are in Mysql).…
-
2
votes1
answer924
viewsDelete all objects from a schema
I have a database on oracle where I need delete all objects of a particular Schema, I cannot exclude the Schema, because the validation of the system is based on an algorithm that takes into account…
-
2
votes4
answers492
viewsOrable DB and MVC 4 - Connection error (ORA-06413)
I have a dll which is responsible for carrying out the consultations in the bank. Therein dll, in the connection class, I have a method that opens the connection to the bank and returns the…
-
2
votes3
answers218
viewsPossibility to create 200 columns in a database
I am planning a software, which is a test of 200 questions where each question can only have 3 choices and select only one of them, and each question belongs to a class type ( for example question 5…
-
2
votes2
answers343
viewsHow to use store with Doctrine
How to use stored Procedure with Doctrine ? Should I use createNativeQuery ?
-
2
votes1
answer2076
viewsHow to set a Primary key to an existing table on Oracle?
I usually do it directly from the IDE (Sql Developer), but I need to run the script this time. Assuming the existing table TB_CR_INDICADOR_PERIODO and the column COD_CR_INDICADOR_PERIODO as the…
-
2
votes2
answers91
viewsQuery mix of oracle products
I made an indicator here in the company where I list product information, quantity sold, average value, etc. That in a period of time. Now I need the following information: Which is the product that…
-
2
votes1
answer2421
viewsphp echo html tag as text
I have a query in php/oracle that shows the result in the browser, hides a tag "< /b>" while in oracle sql Developer presents everything ok. The expected: '___< /b>' What displays in the…
-
2
votes2
answers3542
viewsCompare with earlier date in oracle
Hello, I need to check which purchases were made in the last 7 days select * from carros car where to_date(to_char(to_date(car.datacompra,'yyyymmdd'),'dd-mm-yyyy')) = trunc(sysdate - 7) returns me…
-
2
votes1
answer87
viewsWhere are the databases saved in SQL*Plus?
I downloaded SQL*Plus on the Oracle website, installed (my notebook is Windows 10) created user and already created some banks, but do not know where it saves the banks I created. Where is?
-
2
votes1
answer590
viewsField alias in oracle Where clause
I have a Decode in my select so: ..... DECODE(MAT.IND_TIPO_MAT_MED, '1', 'BRASINDICE', '2', 'SIMPRO', '9', 'TABELAPROPRIA') TIPOTABELA, ..... I need to pass these values on the clause where, for…
-
2
votes3
answers219
viewsoperation with data sqlserver
Gentlemen, I am migrating my Oracle system to SQL Server, I’m having trouble making the following operation SELECT CASE WHEN (EPL.DAT_VENCIMEN - EPL.DAT_FABRICA) > 0 THEN…
-
2
votes2
answers1743
viewsJdbctemplate - How to commit and rollback?
i am working with a Desktop application and use spring to realize my Inserts in the database. The object I’m using is Jdbctemplate, which has the datasource encapsulated within it. I would like to…
-
2
votes2
answers24947
viewsHow to do for loop in SQL SERVER?
BEGIN <<LOOP_EXTERNO>> FOR V_EXTERNO IN 1..20 LOOP DBMS_OUTPUT.PUT_LINE('Contador externo: ' || V_EXTERNO); <<LOOP_INTERNO>> FOR V_INTERNO IN 1..5 LOOP…