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
-
2
votes1
answer301
viewsFunction Code and (+)
Problem : Resolution: SELECT NOME, DECODE(COUNT(CODIGO_LIVRO),0,'NENHUM',COUNT(CODIGO_LIVRO))"NR LIVROS" FROM AUTORES A,LIVROS L WHERE A.CODIGO_AUTOR=L.CODIGO_AUTOR(+) GROUP BY NOME ORDER BY 1;…
-
2
votes0
answers1319
views -
2
votes1
answer213
viewsPerformance with Exists
A colleague mentioned that by making a EXISTS in SQL, it is recommended to use DISTINCT 1 to improve performance. For example, instead of doing: SELECT * FROM CLIENTES WHERE NOT EXISTS (SELECT…
-
2
votes2
answers1701
viewsLeft Join with + equivalent in POSTGRES
In the oracle I can give a left Join with using (+) ex: select from tabela1 A,tabela2 B where A.id = B.id(+); In the above example was made a LEFT JOIN because I want to return all the data from…
-
2
votes2
answers876
viewsQuery SQL to select student and student name
I have this simple relational model, and I need a query that selects the student and the student’s name.…
-
2
votes1
answer61
viewsHow to pass schema by paramentro in PLSQL?
I have a function that receives a varchar2 value with the Schema name to save the data in the database but in the schema. create or replace FUNCTION hospitalTeste123(MatriculaMedico in number,…
-
2
votes0
answers75
viewssqlldr sql Loader oracle insert file name in a column
I can put the name of the file I am loading in a column via sql Loader? LOAD DATA APPEND INTO TABLE PFD_FILE TRAILING NULLCOLS ( FILENAME char, FILENAME_CERTIFICATION , DATE_CREATE "TO_CHAR…
-
2
votes1
answer100
viewsHow do I save an image in a path by searching from an Oracle base?
I’m trying with the PHP GD library, like this: <?php $con = oci_connect('root', '123', '172.16.1.100/DB'); $stmt = oci_parse($con, "SELECT Nome, Imagem FROM Tabela where ID = '1'");…
-
2
votes2
answers1389
viewsHow to avoid invalid date error in a sub-shipment
In the code below, subconsultation "D" returns only valid dates in the DIA column, however, when trying to filter this column using the WHERE clause, Oracle displays the following error message:…
-
2
votes1
answer118
viewsHow to use order by stop ordering month names in Oracle
Hello, I would like to know how to solve this problem. I would like to take the name of the days of the month and sort them and not the numbers of the corresponding months. Follow the query I…
-
2
votes0
answers37
viewsDynamically connect to an Oracle database with each JAX-RS request
I’m developing a project on Jboss Seam to provide some services via JAX-RS on Wildfly 9. The DBMS used is Oracle 10g, and the services that will be made available are form features that the company…
-
2
votes2
answers1345
viewsconverting numbers into Select Oracle hours format
I need to make a point control report for my company, the situation is as follows. I have the table TGFPON recording the time stamp of the employees who have this desc. desc TFPPON ENTRADA NOT NULL…
oracleasked 5 years, 10 months ago Mateus Angeli 23 -
2
votes2
answers293
viewsUsing Linq to sql, how do I get the generated sql query?
Hello. If I have an example: var agendamento = _repository.First(a => a.iid == id && a.locIid == _usuario.LocalidadeContextoId && a.activeVersion == 0, "", true); I can see the…
-
2
votes1
answer32
viewsRefer to a table by entering "" in Oracle number field
This query needs to bring the address number field between "" SELECT a.ds_endereco, a.nr_endereco, a.nm_bairro, c.nm_cidade, c.cd_uf, a.nr_cep, A.nr_fone, a.nr_celular FROM paciente A, cidade c…
-
2
votes2
answers1138
viewsSQL Syntax Error Exception: ORA-00928: SELECT keyword not found
I have this message while trying to execute a Stored Procedure created on the Oracle: java.sql.Sqlsyntaxerrorexception: ORA-00928: SELECT keyword not found at…
-
2
votes2
answers102
viewsRelationship dates as a result of SQL query on Oracle
Good afternoon, When carrying out the following consultation SELECT CD_ATENDIMENTO,DT_ATENDIMENTO FROM ATENDIME I get the following return However, I need to return only the results that have less…
-
2
votes2
answers55
viewsDoubt with group by - sql
I have these tables: CREATE TABLE empresa ( id_empresa INT, nome_empresa VARCHAR(40), razao_social VARCHAR(40), PRIMARY KEY ( id_empresa ) ); CREATE TABLE departamento ( id_departamento INT,…
-
2
votes3
answers1978
viewsMerge 2 Oracle SELECTS and as a result 2 columns with different values
I am facing a problem, I have two selects sql select * from web.demonstrativo_processados where nroempresa = 1 and data between to_date('2018/01/01' , 'yyyy/mm/dd') and to_date('2018/12/31' ,…
-
2
votes1
answer88
viewsHow to find the name and address of students and teachers in São Paulo
Hello, I have a question in the question that my teacher passed to train. The database has 5 tables being: a alunos, professores and historico in the exercise asks to consult name and address of…
-
2
votes1
answer70
viewsList users' phones from a Join without duplicating lines
Good night, Guys, I have the following problem: I need to make a Join in two tables, USER and CONTACT. Each user has more than one contact (Phone), so when I list the data he returns me lines…
-
2
votes1
answer448
viewsDecrease SQL database size [Oracle] - ORA-12953
I am working on a local Oracle XE database. But it has reached the 11 GB limit. ORA-12953: The request exceeds the maximum size allowed for the database, which is 11 GB. It turns out I deleted…
-
2
votes1
answer68
viewsPerform table grouping with two parameters
good night. I’m still learning database and would like to ask a question with you. I know that if I want to organize my table with the invoiced values per month, I can use group by and filter it…
-
2
votes1
answer1566
viewsError: The provider 'ORAOLEDB.Oracle' is not registered on the local machine
Error: The provider 'ORAOLEDB.Oracle' is not registered on the local machine. I need to do some maintenance on a project. NET , with Oracle 12c version and my operating system is 64bit Windows 10…
-
2
votes1
answer260
viewsC# - Run Oracle Procedure and then select from the created session table
Hello, I’m trying to do the following. I have a database that performs a select and inserts the data into a table that only exists in that session. I need to run this trial and then refer to the…
-
2
votes1
answer1424
viewsOracle SQL Developer Table Creation
create table socio ( id_socio integer Not NULL, nome varchar(256) not NULL, cpf varchar(11) not NULL, email varchar(256), id_situacao integer, constraint socio_id_socio_PK primary key(id_socio),…
-
2
votes1
answer1776
viewsRegular expression for e-mail validation with REGEXP_LIKE on Oracle
I am trying to introduce an additional validation in my regular expression in Oracle 11G using the REGEXP_LIKE. I want the expression to detect two consecutive underscores but to ignore if they are…
-
2
votes1
answer149
viewsIBM Watson + Java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package…
-
2
votes1
answer746
viewsRounding in SQL
I need to perform a rounding of a result. Oracle looks like this: SALDO_TONELADA = (A.PESO * 20,0); The value of the column A.PESO is of 24.432 and multiplied by 20 gives 488.640. My goal was to…
-
2
votes2
answers120
viewsOracle SQL - Return of the first record between two dates
I have this query: SELECT codigo_usuario, dataproducao FROM tbproducao WHERE dataproducao >= to_date('01/02/2013', 'DD/MM/YYYY') and dataproducao <= to_date('30/03/2013', 'DD/MM/YYYY') and Is…
-
2
votes3
answers69
viewsBreak query result in 2 lines
Good afternoon! I have the following question My query is returning a single line, but I would need it to return two lines, where the first line would be the return of "B" and the other the return…
-
2
votes1
answer81
viewsRemoving data with TRUNCATE wouldn’t be DDL command?
Reading the OCA Oracle Database SQL Exam Guide(1Z0-071) I came across the following definition for the TRUNCATE on the topic of DDL(Data Definition Language): Removes all the Rows-in other words,…
-
2
votes1
answer134
viewsHow to find the size of a file by plsql?
Hello, I’m having doubts about how to find the file size in the PL/SQL language. I’ve searched several places and found this solution as a pattern: declare vExists BOOLEAN; vFileLength NUMBER;…
-
2
votes1
answer60
viewsReturn multiple keys using REGEXP_SUBSTR
I am trying to read occurrences of text records based on an occurrence. By breaking my head I got the following results: For example I want to take the second name, using as a basis the key Empr.:…
-
2
votes1
answer342
views -
2
votes1
answer649
viewsError: NJS-047: poolAlias "default" not found in the Connection pool cache
I’m trying to make a connection using Connection Pool to build a API Nodejs consuming data from Oracledb, I followed the following documentation. However, when trying to make the connection I get…
-
2
votes1
answer45
viewsID being created and not starting with 0 - Oracle 11g
I am studying Database, using Oracle 11g and making the tables in SQLPLUS. I create the table: CREATE TABLE COMPRAS (ID NUMBER PRIMARY KEY, VALOR NUMBER, DATA DATE, OBSERVACOES VARCHAR2(30),…
-
2
votes2
answers22
viewsDoubts with PIVOT on Oracle
Good afternoon, I’m having trouble setting up a Pivot on the Oracle. My query returns the categories in general, so I’m using the pivot to count the number of categories. pivot( count(CAT) for CAT…
-
2
votes1
answer788
viewsGroup different values of days per month (Oracle)
I have an appointment to do, it seems simple, but I’m not able to think of a way to make it work I have to select different values per day and group them by month... For example, a patient goes…
-
2
votes1
answer54
viewsCan I rename an attribute by creating a table from a type?
Following the Object-Relational model, I want to create the tables or_medico and or_atendente derived from t_funcionario that I created. Below follows the structure of type: DROP TYPE t_funcionario…
-
2
votes1
answer41
viewsOracle PL/SQL problem with AS
Good afternoon, I have a question regarding the use of AS in plsql in an oracle database follows the code: SELECT CC.NOME, SUM(1) AS QTD_CEL, SUM(CASE WHEN C.STATUS LIKE 'INATIVO' THEN 1 ELSE NULL…
-
2
votes1
answer24
viewsHow to return the last record of each sale
How to return the last record of each sale considering the max(date)? +---------+--------------------+---------------+ |venda |Data |id | +---------+--------------------+---------------| |0000001…
-
2
votes1
answer47
views -
1
votes1
answer139
views -
1
votes1
answer808
viewsConvert string to WE8MSWIN1252
Starting working with PHP+Oracle, and I’m having trouble encoding the strings in WE8MSWIN1252 format for oracle. Does anyone have more information?
-
1
votes1
answer153
viewsPLS-00324 error when creating Body Package
When compiling the Package Body below, I was returned the following error: Error(16,8): PLS-00324: cursor attribute cannot be applied to non-cursor 'V_CD_ESTADO' What you implied is that the…
-
1
votes1
answer573
viewsOracle Forms: run without browser
I would like to run the form on the desktop itself, without using browser for this. That it’s possible I know, because I’ve seen it, but how do I do it? I am using Oracle Forms, and when running a…
-
1
votes1
answer87
viewsHow to call the Linux sendemail program from within Oracle
I know that the Oracle has a package for this (UTL_SMTP), but I would like to use the Linux sendmail. Does anyone have any example of code or know where the documentation of Oracle about this ?…
-
1
votes2
answers2482
viewsModification update between two Oracle tables
I need to make an integration between two sws of the house and I need help. I have an integration table (3rd) that will receive the data of a new management, if created or modified. For this, I have…
-
1
votes0
answers253
viewsProblems with Oracle Insert with Laravel
I’m having a problem with a INSERT in Oracle used the package yajra/Aravel-oci8, where the following error returns to me: Error Code : 1722 Error Message : ORA-01722: Invalid Number Position : 260…
-
1
votes1
answer1030
viewsWhat is an "active Autonomous transaction"?
I’m getting this mistake: ORA-06519: active Autonomous transaction Detected and Rolled back ORA-06512: at "SGR20.CR_PKG", line 289 View program sources of error stack? Before anyone asks the error…