I have three tables with detail structure and data like this : Table TBL_REFERRAL ID CREATED_DATE USER_NAME REFERRAL_CODE ——————————————————— 1 …
Tag: oracle12c
Delete statement not working on query in oracle
I have a table BK_178_ABC. I want to perform delete statement on this table only when some condition is satisfied: My total count on this table is: select count(*) from BK_178_ABC; ==>22024727 I …
Use v(‘APP_USER’) as default value for column in Oracle Apex
I am trying to use v(‘APP_USER’) as default value for a column. I get null when I use it in select like But when I use it as default in column, like below, I am getting error. Error Can anyone explain this or have a turnaround for this ?? Answer There are other options than V(‘APP_USER’). Since Apex 5, the
Oracle 12c updating multiple rows with the same data
I’m trying to write a script that pulls out all of the distinct ‘words’ in a string and saves them in another field. I’ve gotten the process to work in Oracle 19c (though any advice is welcome) but when I run the script in 12c the first record is correct but all the following records have the same data and
find only the duplicate values in listagg
I am having some duplicate rows in my table. I wanted to find those duplicates. After i have done listagg on the column rp_num my table will have duplicate value like this : SELECT distinct vt….
Need help eliminating Null data and retrieving last months records
SELECT CLIENTS.LAST_NAME, CLIENTS.FIRST_NAME, CLIENTS.DOB, CLIENTS.ALT_ID, CLIENT_SCREENING_TOOLS.SCREEN_DATE, CASE WHEN CLIENT_SCREENING_TOOLS.TEST_NAME = ‘Patient …
Using a DBMS_PIPE.PACK_MESSAGE and DBMS_PIPE.SEND_MESSAGE in a trigger
Env: Oracle 12c I’m looking at using Oracle DBMS_PIPE within a table trigger that will be used by many users. The trigger will fire only on a STATUS update as per below: The following call will be initiated from an Oracle APEX page process where this can be submitted again by multiple users. My question is, for each user here,
Compare dates between two dates at specific positions
Given the following sample records within the table: MY_DATES, using Oracle SQL and/or PL/SQL, I need to always take the first DATE_REGISTERED in this table, i.e. 26/10/2019 and then advance to the third DATE_REGISTERED record/value, i.e. 2/02/2020 and check if the difference is greater than 13 weeks, between them, i.e. The end result for this exercise is to return distinct
Correlated Subquery working differently for Oracle 12c and 11g
We have a generic table that holds multiple records (DDL and DML below): Below are the records: The query below works in 12c, but Errors out in 11g: It errors out with ORA-00904: “AR_TRX”.”TRX_ID”: invalid identifier. I believe this is caused by the correlated subquery AR_TRX linked to the SELECT statement (see comments “– ERROR HERE” above). I need this
List of values as table
I’m looking for a smarter way to have a list of values as a table in Oracle. What I do nowadays is select ‘value1’ as val from dual union select ‘value2’ from dual What I’m hoping for is some …