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
votes2
answers614
viewsHow to make a Select to not show reset result?
I have the select below, which always brings me two lines, one with zero and the other with value: SELECT COUNT(DISTINCT ROMANEIO) ROMANEIO FROM PCN_ROMANEIO_DISTR_ITEM WHERE USUARIO = 'junior'…
-
2
votes1
answer2183
viewsList all Synonyms in Oracle
How do I list all the Synonyms(synonyms) present in my database? I need to know which ones are created to compare between banks what exists. I tried with the code below but does not return synonyms:…
-
2
votes2
answers1443
viewsORA-22922: nonexistent LOB value in SELECT
I am facing a problem with two different consultations on oracle. Both have the sql snippet REPLACE(dbms_lob.substr(wm_concat(disctinct <COLUNA>)), ',', ', ') The error that returns is the…
-
2
votes2
answers1924
viewsCreate Trigger for Quence in Primary key
I have the following table in oracle: table guest id_hospede nome login senha rg cpf telefone sequence: create sequence seq_hospede_1 start with 1 increment by 1 maxvalue 1000 minvalue 1 nocache…
oracleasked 8 years ago André Nascimento 1,258 -
2
votes1
answer148
viewsTruncate tables with Cache
I have a hotel table and reserve table. In the reserve table I have the primary key of the hotel table as foreign key. I can’t truncate because there are relationships between keys. How can I? I’ve…
-
2
votes1
answer118
viewsSaturation of Foreign Keys?
After a long time with non-relational database I decided to come back and I came across a strange situation. My app is a simple chat where this chat has sub rooms. I did a little demonstration: I…
-
2
votes1
answer966
viewsIs there a function to calculate the trend line in PL SQL?
Good morning folks. I need a function to calculate a trend line. I have a query (part of the function): select round(sum(nvl(vl_indice, vl_meta))/12, 2) from ( SELECT SUM (vl_indice) vl_indice, SUM…
-
2
votes1
answer231
viewsHow to calculate the distance between X and Y with Intersection points
In the image above I have mapped the separation positions within the warehouse where I work. I need to calculate how far the person you’re separating travels inside the warehouse. For example if the…
-
2
votes1
answer881
viewsProblem installing OCI8 in a Vagrant vm
I created a VM with the Laravel Homestead I need to install the IOC8 in it: I turn the remote sudo pecl install oci8 as you report here But I get that mistake: ERROR: `/tmp/Pear/temp/oci8/configure…
-
2
votes2
answers204
viewsSave values whenever a new line is added via Trigger
I need help to solve a problem, I tried it halfway, but it’s not working. I have two tables to which I have to perform this activity and create a trigger called trg_line_total to save the value of…
-
2
votes1
answer274
viewsUpdate column with sort items
Hello, In a given relationship table I have a column that stores the ordering, but due to a problem in the application this column was populated wrong data, as the example |user_log…
-
2
votes1
answer235
viewsTransaction control between two different applications
I am working on an application that is divided into two modules, each one in a language (.NET and Java). Application A (.NET) will manipulate the records of a table while application B (Java) will…
-
2
votes3
answers1241
viewsAdd a column with row number in select result
How can I add the row number of the select result in an additional column? For example: select e.ds_estados from estados e This select would return me the registered states AC AL AM ... TO I would…
-
2
votes2
answers4251
viewsHow to make a percentage calculation on Oracle?
I can’t make a Select that can perform 1 ICI calculation on Oracle. Table VS01 Campos: PD = 001 TP = 100 reais ICI = 15 Select PD,TP,IPI, TP * IPI% AS TOTAL <<< aqui que não consigo…
-
2
votes2
answers405
viewsOracle order by
Folks good afternoon when trying to execute the command below by ordering decreasing it displays the following Missing Expression error SELECT * FROM tab_estado WHERE nm_uf like'%MG%' and like'%BA%'…
-
2
votes2
answers60
viewsCalculation for year "turn" with Trigger
How to treat the Trigger below so that the operations carried out between 21/11/2016 and 20/12/2016 return date 20/01/2017 instead of 20/01/2016. DECLARE P_COUNT NUMBER(5); DIA_VENDA VARCHAR(2);…
-
2
votes1
answer110
viewsSQL query using several times the same function
I have a function that converts the identification of a version to number, example, of 1.0.0 for 10000, because I can filter the results. Function: CREATE OR REPLACE FUNCTION…
-
2
votes1
answer3406
viewsTNS-03505 - ORACLE tnsping
While trying to drip, using the tnsping. ex: tnsping UMEXEMPLO The following error appears to me TNS-03505: Failed to resolve name Which solution usually applies? EDIT: From other machines we…
-
2
votes1
answer2791
viewsCLOB for string and vice versa
I’m developing a web server where I have to store images in String of Base64 exchanged for desktop, mobile and website to the database of the Oracle, but I’ve done a lot of research and seen some…
-
2
votes1
answer178
viewsQuery not working, problem to compare years
Hello I’m trying to elaborate a query to perform an Insert, as it uses only database data I am a select for this. My problem is in Where clause in which either end of operation has to be null or end…
-
2
votes1
answer32
viewsAbout the tables and Sequences that "comes" with Oracle
It occurred to me a question about the need to keep the tables that comes "ready" in oracle. When you create any connection, when looking at the tables you can see several tables and sequences, what…
-
2
votes1
answer95
viewsQuery using Entityframework why the performance variation?
I have the following querys using Linq to Object: _Context.GerenciaTransacao.Where(x => x.Placa == "LUN1320").ToList(); in this query, the results return in 100ms. and string placa = "LUN1320";…
-
2
votes1
answer134
viewsSelect previous row if null
I have the following table in Oracle and I want to fill value that is null in the Activity column with the value of the previous row. How to do using Oracle?…
-
2
votes1
answer288
viewsDoubt use of Sequence - Oracle
I have a table on oracle 11g which in turn has a CREATE TABLE "BANCO"."TEXTO" ("TEXTOID" NUMBER NOT NULL ENABLE, "NOME" VARCHAR2(4000 BYTE) NOT NULL ENABLE, "VALOR" VARCHAR2(4000 BYTE) NOT NULL…
oracleasked 7 years, 8 months ago Marciano.Andrade 1,205 -
2
votes2
answers157
viewsIf I declare a variable in a SELECT query is it required?
My problem is that I won’t always receive the variables, so I need a way that doesn’t make them mandatory even if I declare them, for example in the query below: "SELECT * FROM clientes WHERE…
-
2
votes1
answer1446
viewsHow to insert time into Oracle?
I need to save only the hour and minutes (seconds make no difference, so having or not, whatever) I should use TIME or TIMESTAMP ? I started doing with TIMESTAMP(6), but I’m having a hard time…
-
2
votes1
answer13534
viewsProcedure Oracle return query lines
I have the following table: CREATE TABLE CARRO ( CD_CARRO INT ,DONO VARCHAR(20) ,MARCA VARCHAR2(20) ); The Inserts INSERT INTO CARRO VALUES (1,'VICENTE','FERRARI'); INSERT INTO CARRO VALUES…
-
2
votes2
answers363
viewsUsing & in Oracle Search
I’m having a question about using & on Oracle. See below my table. When searching for the description 'Easy Breezy Emailmkt & Eu', Oracle opens a window for passing parameter, as shown…
-
2
votes1
answer612
viewsWhat would be Pro*C/C++?
From what I saw it is using in Oracle, but I can use with another Bank? Pro*C/C++ useful these days? Could pass a Code Example? Does it differ from PL/SQL? Or are they used together?…
-
2
votes1
answer8090
viewsWhat’s the difference between Varchar and Varchar2?
I have a question regarding the types of data in oracle: In Oracle, What is the difference between varchar and varchar2?
oracleasked 7 years, 2 months ago Renato Junior 992 -
2
votes1
answer284
viewsKnow which Procedure or session is leaving open cursors
I wonder if there is any way to find out which session or Procedure(s) are leaving cursors open on Oracle, sometimes (not always) error occurs: ORA-01000: Ximum open Cursors exceeded…
-
2
votes1
answer39
viewsCopy of Oracle materials structure
We have the following material registration structure: Table Pk FK Filial Descricao material Group Cod_grupo 1 - 1 Materiais de escritório 2 - 1 EPIS 3 - 1 impressos Subgroup Cod_Subgrupo Cod_grupo…
-
2
votes1
answer467
viewsDjango and Oracle database (accessing your views via ORM)
Hello, despite the title self explanatory. I will detail my doubt to follow. I have a pre-existing Oracle database, integrated it with Django by configuring the default connection in Settings and…
-
2
votes1
answer248
viewsUSING PIVOT ORACLE
I have that result: Ana DEC 123 7 2016 1GG Ana DEC 123 3 2016 1GG Ana DEC 123 3 2016 1GG Ana JCM 123 5 2017 1GG Edson DES 123 11 2016 1GG Edson DES 123 3 2017 1GG I’m using this PLSQL: SELECT * FROM…
-
2
votes2
answers6537
viewsRemove Oracle Special Characters
Good morning, I have a query here made in Oracle where in one of the records is bringing a string starting with quotes, has some function oracle to remove only the quotes at the beginning and at the…
-
2
votes1
answer101
viewsConvert query to Sqlserver
I have the following query for the Oracle bank: select xmlagg(xmlelement(e, d.delinha, '').extract('//text()') order by d.nulinha).getclobval(). I need to convert to run in the Sqlserver bank, but…
-
2
votes1
answer468
viewsHow to declare "nullable" parameters in an Oracle database?
I need my process to accept null values in some parameters of type Number. How do I do this in PL/SQL? Currently: PROCEDURE SP_EDITAR_QUADRO( P_IDQUADRO IN NUMBER, P_IDFUNC IN NUMBER, P_IDTRAB IN…
-
2
votes1
answer888
viewsSQL Developer does not run on Ubuntu
I’m trying to run Oracle SQL Developer on Ubuntu and when it arrives in the image part below the execution gets stuck. I searched the internet but couldn’t find anything that could help me. Someone…
-
2
votes1
answer69
viewsHow to select columns in which years are equal in Oracle?
I have a table called Clientes, and in it I have the following columns : id_cliente nm_cliente dt_nascimento I need to select and count all customers who were born in the same year. I have tried…
-
2
votes4
answers2882
viewsHow to extract data from an SQL query in C#
I’m not long in developing in C#, so I’m still learning... How do I extract the data from the query result made in the database? public static DataTable ConsultaCidade() { DataTable pDados =…
-
2
votes0
answers1330
viewsFailed to convert to internal representation
Good afternoon, I’m working with Genexus Ev3 Up1. I have a Data Provider that searches for a query and returns an SDT with the information, but of the error in TOMCAT with the message of:…
-
2
votes2
answers6341
viewsHow to get last Quence on Oracle?
I tried 3 different ways, to make one select of the last sequence of my table, but none worked. SELECT SEQ_ID_PAIS.CURRVAL FROM DUAL; Error: ORA-08002: a sequência SEQ_ID_PAIS.CURRVAL ainda não foi…
-
2
votes1
answer403
viewsTable is not generated in Oracle database
That normal wheel: create table M_VENDEDORES ( ID_VENDEDOR number (10,0) not null, NOME varchar2 (100) not null, CPF number (11,0) not null, ENDERECO varchar2 (100) not null, NUMERO varchar2 (10)…
-
2
votes1
answer55
viewsIs it possible to "Group by" by column content?
I was wondering if it was possible to use GROUP BY based on the date of a column, in this case the column ANALYSIS that creates groups whenever it finds 0, instead of the column. DIA MES YEAR TODAY…
-
2
votes0
answers37
viewsWhat is the advantage of saving whole in the field that I want to save prices?
I was reading about building RESTFUL API with Laravel, and I noticed an interesting flame that I once wondered if the way I always saved "money" in the database. Is there a problem in saving as…
-
2
votes1
answer1442
viewsHow to do sub-query correctly in Oracle?
I need to do a sub-query of a table to find all employees who work in the same department that is part of São Paulo, but I’m not getting it. That is, I need to select from the three tables,…
-
2
votes1
answer2546
viewsHow do I know if a column exists in an Oracle table?
I’m trying to add a new column to an Oracle table, and I want to know if it already exists or not. I’ve tried something like this: IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE…
-
2
votes1
answer2668
viewsSql runs on Oracle SQL Developer, but does not run on C#
vsql = @"INSERT INTO ALUNOS_ (UF, IDADE, TELEFONE, NOME_PAI, ENDERECO, EMAIL, NOME, CIDADE, NOME_MAE) values ('sp', 0,'','','','','','','');"; This SQL when running on oracle does the insertion but…
-
2
votes1
answer209
viewsHow to create a query with a non-existent and error-free table
I have a query that runs in several different schemas in the database, and there is a specific table that only some schemas have, and if there is the value returns. SELECT t.coluna1 ,t.coluna2…
-
2
votes3
answers1756
viewsHow to declare a cursor variable in PL-SQL?
I have a course: Cursor Pessoa is Select nomeFuncionario From empresa; -- Variaveis para uso da rotina variavel How would the variable ?