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
-
0
votes1
answer209
viewsConvert DATE in SQL (Oracle) from UTC to Brazilian time zone
I have the following query: SELECT c.name, t.sequential_id AS sequencialid, CONCAT(SUBSTR (REPLACE (m.content, '¿', ''), 0, 30), '...') AS content, m.direction, (CASE WHEN TRUNC("M"."DATE") =…
-
0
votes1
answer52
viewsSQL grouping
I need to select the following: 'SELECT TR.CODPARC, TR.NOMEPARC, TB.CODVEND, TV.APELIDO, TV.AD_CARTAOCAMP, TP.AD_CAMPLENTE, TP.AD_CAMPPONTOS FROM TGFCAB TB, TGFITE TE, TGFPRO TP, TGFPAR TR, TGFVEN…
-
0
votes1
answer40
viewsBring manager and employee who are on the same table
I have a table of EMPLOYEES and another call HIER_SAP. In the HIER_SAP I have two important fields for what I want, that are the fields CODSUP and CODFUNC. For each CODFUNC(official) I have a…
-
0
votes0
answers50
views -
0
votes0
answers146
viewsHow to group by column only when it is not null (Oracle)?
The query is summarized to facilitate: SELECT nome,idade,profissao,cidade, bairro, estado, pais FROM objeto group by nome,idade,profissao,cidade, bairro, estado, pais; However 3 columns can come…
-
0
votes1
answer48
viewsSelect in NODE returns empty
When I run this query: SELECT xml_nfe FROM NDD_COLD.COLD_PROD WHERE ide_id ='NFe42200602831172001104550000010390091233318028' In plsql it returns me a line with information, then I pass the same…
-
0
votes1
answer61
viewsOracle SQL Query with Group By starting and ending on different days
I need to sum up grouped numerical records per day within a month, I have the timestamp of all records, but I can’t make a group by because my day starts with the 00:15 record and ends with the…
-
0
votes1
answer92
viewsOracle Session date format for running Stored Data
Talk guys, all good? I have a little problem that may be simple to solve, but I could not find solution so far. I have procedures stored in the oracle database that need to be executed, however I am…
-
0
votes1
answer115
viewscount amount of records in recent months
I have 3 aircraft tables, occurrence and aeronave_occurrence, I need to know if the same aircraft was present in any event in the last 2 months of the data_utc back, and how many aircraft were…
-
0
votes1
answer45
viewscounting records by time interval
I have 3 tables: aircraft(id_aeronvave, registration); occurrence(id_occurrence, data_utc); aeronave_occurrence(id_aeronave_occurrence, id_aircraft, id_occurrence) I have this list of aircraft by…
-
0
votes1
answer107
viewsExtract date in text column
There are other ways without use Regex to extract data of a text column in Oracle 19c. So far I managed using Regex as follows: select REGEXP_SUBSTR(p.observacao,…
-
0
votes4
answers68
viewsDoubt about Group by
using SQL Server I have made the following select to select products purchased by customers: select ITEMPEDIDO.IDPEDIDO, ITEMPEDIDO.QUANTIDADE, CLIENTE.NOME from ITEMPEDIDO, cliente, pedido where…
-
0
votes3
answers92
viewsError using case clause inside a Where
I’m having the following error in trying to use the case clause of a WHERE. ORA-00905: palavra-chave não encontrada 00905. 00000 - "missing keyword" *Cause: *Action: Erro na linha: 56 Coluna: 39 My…
-
0
votes1
answer52
views -
0
votes1
answer73
viewsRelationship with log table
Guys, guys, beauty?I have two tables from an oracle database: Fields in Table A: No. do chamado Data de conclusão do chamado Funcionario que concluiu Fields in Table B: Funcionario Area do…
-
0
votes0
answers22
viewsOracle 19 User Interface Authentication using ODP.Net Core
We are developing an . Net Core 3.1 application that connects to an Oracle 19 database. During authentication with an Oracle User Enterprise we are receiving the following error: "ORA-01017: invalid…
-
0
votes1
answer30
viewsRemove SQL CASE parameter agreement results
As follows the query below, I need to remove from the SQL query the results that have the field CLIENTE_UNICO EQUAL TO 'MULTIPLE PURCHASES IN THE PERIOD'. SELECT NFE.CD_CLIENTE AS "COD. DO CLIENTE",…
-
0
votes2
answers42
viewsCOLUMN SCRIPT (SIDE BY SIDE)
good afternoon! I’d like some help. I have this script below (ORACLE), I need the results to be returned in columns. SELECT a.nr_prescricao, substr(Obter_Valor_Dominio_Status_LIS(a.ie_etapa),1,90)…
oracleasked 4 years, 1 month ago Renan Kawamoto Fagundes 15 -
0
votes0
answers40
viewsHow to verify if a value exists in an Oracle Process input parameter and make a decision?
I have a trial that has a type VARCHAR2 of entrance parameter: PROCEDURE PRC_MINHA_PROCEDURE ( PI_ID IN TB_1.ID%TYPE PI_ID_ATRIBUIDO IN VARCHAR2 DEFAULT NULL, PO_TP_RESULT OUT t_cursor ) AS…
-
0
votes2
answers53
viewsUnion of two selects presenting online
Below is a query performed for ORACLE database: SELECT ITOS.CD_NUMERO_OS, ITOS.DESCRICAO_RECLA AS "DEFEITO APRESENTADO" FROM GMITEMOS ITOS INNER JOIN GMOSERVI OS ON OS.CD_NUMERO_OS =…
-
0
votes1
answer54
viewsORACLE displaying date field with 1 more day at the end of the months with 31 days
I created a function in ORACLE to calculate the date of the last installment by passing as parameter the number of installments and using the function ADD_MONTHS(DT_PRIM_PARCELA, INSTALLMENTS).…
-
0
votes1
answer117
viewsIs there any way to get a JSON "result" using Oracle’s utl_http package
Is there any way to get a JSON "result" using the package utl_http oracle ? The status code of the following routine returns 200 but would also return a "Sponse" with a JSON conformation, an…
-
0
votes1
answer36
viewsSQL - doubt in query
I have the following appointment to do, I was able to think of them separately. I’m starting to study databases and I don’t know how to relate the two. Table Occurrence number, date, description,…
-
0
votes1
answer24
viewsHow to create a read sequence in a Select field in the Oracle Database?
I have a problem in my code I would like a help with an excerpt of my code. the ITE.SEQUENCIA line did not want to leave the number 1 fixed, because it may be that an item is deleted and starts with…
-
0
votes1
answer41
viewsTurn row into columns using pivot
I have this list that is the result of the query below: This is the query: SELECT PERIODO, ST_NOME_SUPERVISOR, Sum (NU_TOTAL_VENDA) AS NU_TOTAL_VENDA FROM ( SELECT UPAI.ST_NOME AS…
-
0
votes0
answers60
viewsAdd values to a PL/SQL cursor
Good night. I am trying to define the values of a cursor in PL/SQL, however one of the values is never filled. In this case, the qtd_daysSummary number never has content, however all others do,…
-
0
votes0
answers69
viewsHow can I bring in a select a date range of a period in the oracle database?
Good morning, everyone, I have a question but I wanted to know if it is possible to make such action. I have a table with two date fields, start date and end date, I was wondering if it has how to…
-
0
votes0
answers20
viewsSuccess message when registering in the oracle database but it doesn’t work: using php
I’m using the oracle bank. When I sign up for an Employee, the page displays success when registering. But when I check the bank, it doesn’t appear there. Did my code have some logic error that I…
-
0
votes1
answer57
viewsSubselect and concatenate the same Oracle column result
I’m with that query, without the subselect she returns to me: Cod_atendimento | cod_agrupamento| cod_material 11223. 2. 200 11223. 2. 300 Result I’m trying to: Cod_atendimento | cod_agrupamento|…
-
0
votes0
answers204
viewsORA-00933 SQL command not closed properly
Hello, good afternoon I am trying to run the following select on TOAD, but the error is occurring: ORA-00933 SQL command not closed properly SELECT ROWID, ECM_WF_PROC.IDWF_PROC,…
-
0
votes0
answers65
viewsConnection with two banks in c#
I need to connect to two types of databases, namely: Oracle and Postegre. I need to go to Oracle, generate a spool with some queries and upload this spool in Postegre. Is it possible to do this in…
-
0
votes0
answers45
viewsHow to filter a select result based on data contained in another table?
Good afternoon, Folks! I’m having a hard time building a select that is filtered based on a data contained in another table. To contextualize: It is a warehouse management system (WMS) and need to…
-
0
votes0
answers31
viewsOnly allow the transfer of files sent and recorded on the station (temporary), to the user’s machine after all processed
Someone can help me, such as just downloading the temporary file to the user folder after processed. Below is an example. Example: Temporary Station: Recorded files S-29012021-007-0000192.txt…
-
0
votes0
answers124
viewsDivision by zero in PLSQL
Hello. The Code below sometimes does not run because it is presented the error: You cannot divide by zero. I tried to do with a case, but my code is too big and the case would leave the structure…
-
0
votes1
answer35
viewsPLSQL shows error: PLS-00103 in function when using an Exception
PLSQL is reporting error PLS-00103 when I try to compile this function. Note: If I try to run only with the first option of this case "P_TIP = 1" it runs normally. If I try to add the case "P_TIP =…
-
0
votes0
answers45
viewsDatabase, SQL database
I am doing a job for the college whose goal is to create a table using Oracle Live SQL So far mine’s been like this: create table ALUNO ( rgm number(8), nome varchar2(50), nome_pai varchar2(50),…
-
0
votes1
answer23
viewsINSERT using SEQUENCE . NEXTVAL with another SELECT
I can insert with this query in ORACLE INSERT INTO CONF_CODE (ID, OPTION_NAME, ISCHECKED) VALUES (SEQ_CONF_CODE.NEXTVAL, 'Producao', 0); But I need to fill this table CONF_CODE with a SELECT from…
-
0
votes0
answers37
viewsError while trying to create index
I’m trying to create an index by command: declare cont integer; tabela varchar2(100) := 'DECLARACAO_IMPORTACAO'; coluna varchar2(100) := 'DESPACHANTE_FK'; indice varchar2(100) :=…
-
0
votes1
answer53
viewsTurn rows into columns in SELECT Oracle
Below is a select for data query in a table: SELECT 'OS:'||AT.CD_NUMERO_OS ||' ITEM:'|| AT.ITEM ||' ETAPA DA ATVD:'||AT.CD_ETAPA_ATIVID||' ATVD:'|| AT.CD_ATIVIDADE AS "DADOS DA OS", AT.DT_INICIO AS…
-
0
votes1
answer97
viewsOracle PLSQL - How to get the lowest and highest value from a list of values in a range?
CREATE TABLE TABELA_PRAZO ( CEP_INICIO NUMBER(8) NOT NULL, CEP_FIM NUMBER(8) NOT NULL, PRAZO NUMBER(3) NOT NULL ); insert into tron2000.TABELA_PRAZO(CEP_INICIO, CEP_FIM, PRAZO) values (1000000,…
-
0
votes0
answers14
viewsError: java.sql.Sqlsyntaxerrorexception: ORA-00979: not a GROUP BY Expression Please correct SELECT statement
I am having this error after the query. $A$ is the table nickname! I need to know how many records have duplicate number, but my query is wrong and I am unable to find the error! SELECT…
-
0
votes0
answers30
viewsAdd, update, or delete data from a column by adding, updating, or even deleting data from another column:
Hello! I am starting in Java programming and also in Oracle SQL and I have a problem: I need a particular record of a column of a table to be updated, added or removed from a column of another…
-
0
votes1
answer115
viewsHikari timeout oracle springboot
Hi, I’m trying to manually set up a connection pool with Hikari. I will need to do manual because the application will have its dynamic settings for connection to the databases and schemas/Sid. How…
-
0
votes1
answer24
viewsError in the subselect of an sql script to generate update script bringing more than one line and giving errors
I have two tables, a partner of which some fields of cnpj_cpf are wrong and another that I went up with the corrected data, totaling I have approximately 1 million lines to solve, so I generated a…
-
0
votes0
answers60
viewsReturn multiple lines, in a single comma separated by ORACLE
I need to bring these results, in a single line, where it is only separated by a comma, how do I do that? Query: SELECT ' '|| (SELECT DECODE(MAX(g.ds_opcao),NULL,'',MAX(g.ds_opcao)||' - ') FROM…
-
0
votes0
answers16
viewsReturn the name of the course and the names of the disciplines for which there are no enrolled students
I have these tables and would like to know how I select course name and the names of the disciplines that do not have students. create table aluno( codaluno int primary key, nome varchar(30),…
-
0
votes1
answer18
viewsHow to make row values return as columns in a select in Oracle?
The select I made is returning conforms example below: Select: SELECT Count(*) AS total,b."Nome",a."Funcionalidade", DECODE(a."Funcionalida", 128, 'ProdutoA', 4, 'ProdutoB', 512, 'ProdutoC' ) tipo…
-
0
votes1
answer42
viewsSelect Conditional with another Select
I’m using SQL Oracle. I need to return a Select that depending on the value of the column GRUPO_ECONOMICO_ID (needs to be equal to 87) it must run a Select, otherwise it must run another select... I…
-
0
votes1
answer43
viewsthe identifier 'DMBS_OUTPUT.CHARARR' must be declared plsql oracle
I am writing the following plsql code: declare tab dmbs_output.chararr; qtlines number default 3; res varchar2(100) default null; begin dbms_output.get_lines(tab, qtlines); dbms_output.put_line(…
-
0
votes0
answers19
viewsTO_DATE method in Oracle SQL is generating an unintentional Timestamp, how to remove it?
I have a column called 'periodo_filter' with date of type (data1 A data2), example: (01/1/2000 A 19/1/2020). With the following code I am removing the first date from this column and creating a new…