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
answer29
viewsDoubt with bank restore on oracle 11g
I’m having a hard time, I have my local bank, oracle XE, I’m adding a backup of the database I received, I made the following settings described, after finishing the bank’s Restore successfully, I…
-
0
votes2
answers51
viewsUpdate Oracle Error
I need to do an oracle update, two tables related to the same fields, ran the command below, and gave the following result. UPDATE SAC_RV_DIVIDENDO,SAC_RV_DIVIDENDO_QTD_POS SET DT_EX='20190110'…
oracleasked 4 years, 10 months ago MARCOMONACO 1 -
0
votes1
answer292
viewsoracle SELECT ... FOR UPDATE with PHP
I have the second consultation: SELECT proxNum FROM orcamento FOR UPDATE; UPDATE budget SET proxnum = proxnum + 1; It serves so that I can capture the next available budget number and already do an…
-
0
votes1
answer9613
viewsOracle - ORA-01722: invalid number
Can you help me with this error? It usually gives invalid number when I don’t quote simply. I tried to convert to number (although column is varchar2), but error persists DECLARE TYPE cVetor IS…
-
0
votes2
answers284
viewsSQL Oracle - Clob to Number
I have a table which does not have to be remodeled, it is composed by a CLOB field which has decimal values separated by point ex:(123.12) I need this field to be returned to me in the result as a…
-
0
votes1
answer244
viewsDo you have a better way to format value with space after the symbol of the coin?
Good morning ! I have a need to format the value with a space after the symbol of the coin in Oracle, I managed using the form below: select to_char('0','L')||'…
-
0
votes1
answer128
viewsIdentify the reference column of an Oracle virtual column
I have an index on Oracle in which one of the columns is DESC. I create it as follows: CREATE INDEX XFT25TB ON FT25T (FT07CODEMP, FI16MODELO, FT07CODIGO, FT25ORDIMP, DESC) However, when using…
-
0
votes1
answer253
viewsHelp with Trigger Mutating
I am creating a Rigger that needs to be fired through a table, even creating a COMPOUND TRIGGER it accuses error of mutating, I am aware that I cannot perform a SELECT of the table I am firing to…
-
0
votes1
answer43
viewsHow to Optimize Substring Regular Expression in Oracle BD
I have the following expression: SELECT us.FULL_NAME, us.USER_ID FROM knta_users us WHERE USER_ID IN(SELECT DISTINCT REGEXP_SUBSTR(PRJ.PRJ_PROJECT_MANAGER_USER_ID, '[^#@#]+', 1, LEVEL) AS GP_ID FROM…
-
0
votes1
answer252
viewsSQL Error: ORA-29855: Error in executing ODCIINDEXCREATE routine
I’m trying to create an index on Oracle where it will be automated and run every hour. Query: CREATE INDEX IX_TXT_NOME ON TBL_PESSOA ("TXT_PESSOA") INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS…
-
0
votes0
answers38
viewsGives error when executing this query in the system that generates reports
Error executing this query in the report system, but directly from the database returns right> ERROR>>> ORA-00942: table or view does not exist Stijdbcdatabase The consultation is a very…
-
0
votes0
answers14
viewsThe dt_drive column will have the default value as the system date
I have a script in oracle that inside a table called "move" there is a column called "dt_move" and inside this column there is the DATE value i would like to change this value to the date of the…
-
0
votes1
answer136
views -
0
votes0
answers36
viewsKnow the last schema that was changed synonym
I have an Oracle server that has several schema, for the purpose of explanation, understand the metaphor: There are schema classified as LETTERS, and schema classified as NUMERIC, and several times…
-
0
votes1
answer32
viewsWork with dates and times in a table
I created a diagram of a gym that has schedules and days, also created two tables on Oracle, which are these: create table dia_semana ( coddia number (6) primary key, dia DATE); create table horario…
-
0
votes2
answers24
viewsOperation using another table field
I need to calculate the amount of consumption of a material. And I wanted to look for the multiplier factor of the unit of another table, but the system presents me the following message:…
-
0
votes1
answer168
viewshow do I use php to separate the information into a json_encode variable?
I’m doing a query inside another in php until beauty works but the result of the query inside only returns me a line that would be the last line, plus the query had to return 3 lines so I decided to…
-
0
votes0
answers72
viewsI can’t run Precedent in PHP - Fatal Error on the execute line( )
I cannot run a precedent by PHP, at the time of sending the PDO execute displays the image error, in my base oracle the Procedure runs normally. I tried to make it display the SQL error but failed…
-
0
votes1
answer343
viewsHow to add 1 second to an Oracle date?
I am trying to search a table for a row that has the start_date in the second after the date placed. select * from PAY_PERIOD where pay_period_schedule_id = 2 AND start_date = TO_DATE('2020-04-30…
-
0
votes1
answer488
viewsHow to change the order of the parameters in Oracle SQL Developer
I have a question regarding the order of the parameters within SQL developer. Query for example: select * from conta_paciente where cd_convenio = :cd_conv and dt_conta between :dti and :dt In older…
-
0
votes0
answers46
viewsORACLE : Select Rows Where First, Last or Both Characters are Special or Punctuation, excluding Dot '.' if Last
I need to Retrieve Rows from table, in the Column [Client Name]. My request is need to Prevent Names that Start or End with a [:space:] or other special Character [:Punct:], excluding the dot '.' -…
-
0
votes1
answer70
viewsLog trigger that saves the numbering of the JOB that executed the change
I need an oracle resource to use on a Trigger, which searches which JOB or Scheduler_job executed such a change. I am using Sys_context to get some example information: User, Terminal, Program…
-
0
votes2
answers55
viewsAdd several selects
How do I add the result of several selects, for example, I have 2 selects that each of them brings a value field, ie with the sum of something... Select 1: SELECT SUM(ms.valor) as valor FROM…
-
0
votes1
answer1012
viewsInvalid identifier during select SQL - Oracle
I am trying to seek information according to the business rule, which in case is ID and CPF of the Client of a certain City and this client in question can not have Debito active, but the ways I am…
-
0
votes0
answers51
viewsOracle DDL trigger , identify a "drop column"
In Oracle it is possible to create DDL triggers (Data Definition Language) something like create or replace trigger trg_ddl before ddl on database declare begin ... end; My , doubt , how to…
-
0
votes0
answers27
viewsHow do I use a previous condition on Oracle?
I’m having a hard time using two columns as a condition in Where. I don’t know if I can explain it properly, but: WHERE P.PROFILE_STATUS = '1' AND P.JOBTITLE NOT IN (' -…
-
0
votes2
answers995
viewsis not a GROUP BY expression
Hello . I am trying to execute a certain Query on Oracle and I am getting the following error : "is not a GROUP BY expression". Below is the list of tables and query: BILL NRO_CONTA|COD_AGENCIA|NOME…
-
0
votes1
answer823
viewsValidation of CNPJ in PL/SQL Oracle
I wonder if anyone knows or knows a CNPJ validator in PL/SQL Oracle. Needed the user to put the value in a "dbms_output.put_line" and call a validator. I already got a validator that I will put down…
-
0
votes1
answer171
viewsError: FROM keyword not found where expected
I am trying to do the following Inner Join but am getting error: FROM keyword not found where expected select e.num_exame as [exame], a.num_amostra as [amostra], e.data_hora_exame as [exame],…
-
0
votes1
answer1315
viewsRun oracle database in sql
I know it may sound like a stupid question, but I’ve already googled it and I haven’t found anything concrete, I own a trial where her call is like this: PROCEDURE pr_rel_saldo(p_codigocliente IN…
-
0
votes0
answers74
viewsOracle SQL Developer - TO_CHAR Bugs
Good morning. I have a problem/doubt: Why is it not possible to use TO_CHAR more than once for the same field? And why does this influence the outcome of other fields? If someone can explain it to…
-
0
votes0
answers66
viewsLimitations in an SQL query
I have to make a report that shows the main customers of each seller (the top 10 customers who spent on each seller) I am using the Oracle database to make this query. Each seller has more than 40…
-
0
votes0
answers247
viewsConvert Column to Oracle Lines
Good morning! I need the result of this SQL: SELECT CD_ITEM_PAI, CD_ITEM_FILHO FROM ESTRUTURA WHERE CD_ITEM_PAI = 707534 That at the moment is this: Be that as it may: Can you help me? Using PIVOT I…
-
0
votes0
answers142
viewsMultiple return IN and CASE clause using Oracle SQL
I have a situation, using an Oracle-SQL database, where depending on the value informed of a variable (YES/NO), the value being used in the query will change. I tried as below but returns the error:…
-
0
votes1
answer73
viewsHow to fix ORA error - invalid weekday?
When I run the direct query in Oracle returns correct, but when I do via Intelij/java, returns the error: ORA-01846: it is not a valid day of the week. SELECT analog,DEVTYP, trunc(data), Max(dis)dis…
-
0
votes1
answer59
viewsSQL Summing all values, how to break by blocks
I have a table that stores financial values per month, I need to display by year, I made a SUM and it worked when I have only one project registered, when I have more than one project it sums up all…
-
0
votes1
answer69
viewsSelect different conditions for the same column
I have the following table with my current query. Data | PesoTotal 01/04/2019 | 500 02/04/2019 | 800 And I would like to add a new column (Pesohorario), which would be the Peso on the date, but…
-
0
votes3
answers405
viewsTrigger that inserts automatic value in a record
Good afternoon, guys. How are you? I’m trying to create a Rigger that when performing a partner registration it automatically marks that the partner is a client. In the database, this field is…
-
0
votes2
answers538
viewsUpdate in year without changing the month, day and time
I am trying to make a script to change the year of a table record where the dta_shutdown field has the date in the format of 08/25/2091 13:06:00 in Oracle database. I need to change the year 2091.…
-
0
votes0
answers114
viewsDBMS_OUTPUT.PUT_LINE command in oracle does not print anything and still the block is executed
I’m doing some exercises of fixing PL/SQL only that overnight the DBMS_OUTPUT.PUT_LINE stopped to print things in the SQL Developer console, and I have tried opening a new script or in several types…
-
0
votes2
answers1897
viewsHow to get the last record of a table in Oracle
I want to bring only the last record(last sequence) of a table. But even using the max in the column I want, it ends up bringing more results than expected. select distinct a.vl_recebido…
oracleasked 5 years, 6 months ago Luiz Fernando 9 -
0
votes0
answers19
viewsvalues calculated on oracle with differences
Good afternoon! Run the select: SELECT 5.297800000 * 251564.541760000 FROM dual Returns the value: 1332738.62933613 I run the same calculation in a package and get the value: 1332738.629336128 With…
-
0
votes0
answers80
viewsPLSQL - Nextval fault
The following code: Create a Trigger that creates a log record every time a product is changed. CREATE OR REPLACE TRIGGER CREATE_LOG AFTER UPDATE OR INSERT ON PRODUTO FOR EACH ROW BEGIN INSERT INTO…
-
0
votes0
answers49
viewsSubselect with Inner Join on Oracle 11g
In Oracle 11g version, when we try to select with a subselect that connects the internal table with the external one by Inner Join, the error occurs "ORA-00904: "FIELD": invalid identifier". select…
-
0
votes1
answer284
viewsOracle SQL - select only clients with more than one order, listing items from two ID tables, EMAIL and ID_ORDER
I have two tables: table CUSTOMERS ----------------------------------- ID_ | EMAIL 01 | [email protected] 02 | [email protected] 03 | [email protected] table ORDERS…
-
0
votes1
answer174
viewsSelect Distinct in only one of the tables
I have the following separate tables, A and B which I am placing next to each other to facilitate: +--------------+------------+-------------+ |ID Relacional | A | B |…
-
0
votes1
answer27
viewsProcedure in oracle
I can not very well create procedures with the output values, how to receive a value, and return it after the call, someone could help me with an exercise that I am doubtful Create a procedure that…
-
0
votes0
answers52
viewsProblem when recording data
I’m performing a query on a table where the structure is : Documento Produto 123 Camisa Posh rosa 127 Calça Handara 36 127 Meia Barby 158 Calça Handara 38 129 Blusa Yoll M 129 Blusa Yoll azul P 129…
-
0
votes0
answers48
viewserror when connecting the Knex to the oracle Database
I am trying to connect the database to the nodejs with the Knex, but when making a call on the connection I get the following error, Unhandledpromiserejectionwarning: Error: DPI-1047: Cannot locate…
-
0
votes2
answers67
viewsHow to calculate the value of two subquery in Oracle SQL
How to calculate two subquery on Oracle? Could you explain to me how I sum up VALOR_1 + VALOR_2? SELECT COL1 , (SELECT SUM(TAB1.VLRTOTAL) FROM TABELA TAB1 WHERE TAB1.ID = TAB3.ID) AS VALOR_1 ,…