I have one table called INVENTORY which has data: ITEM_NUM SUB_INV LOT_NUM QUANTITY LOT_EXPIRY_DATE 101 22 A1 10 9/29/2019 101 22 A2 14 9/28/2019 Let’s say,…
Tag: oracle12c
SELECT Data with logic created date not greater than
I have three tables with detail structure and data like this : Table TBL_REFERRAL ID CREATED_DATE USER_NAME REFERRAL_CODE ——————————————————— 1 …
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 …
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 …
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 …
Do Changes Made on Table Created by Joining a View and an Another Table Affect Original Table View Based On?
Suppose I have a view created on a table. If I change some record on my view, the original table is also changed too. What if I join this view with an another table and change some records on this …
How to bind variable in string in SQL query?
I am using SQL Developer. When I want to bind value. Normally I use following syntax: but, I don’t know how to do that in string. The following query does not work. Why do I need it? Because my program runs a query in python and assigns something to bind variable: Answer Concatenate the prefix/suffix with the bind variable:
Writing plsql exception errors to DMBS_OUTPUT and FND_FILE job log
I have a MERGE/UPDATE statement. I want to add exception handling such that if the update fails for any reason, write to DBMS_output and job log. I’ve come up with something – it compiles OK, but …
How to produce a running sequence in Oracle based on report column values
I have the following sample Oracle APEX report by where the Origin ID and Origin Name are retrieved from the origin_tab(id,origin_id,origin_name) Based on these two column values, I need to generate …