First of all, I would like to thank you so much for your time in advance. I have a table as shown below: I would like to display the data from the above table as shown below: If no data is present within the COL_DESC for a row then the data from the COL_NAME column needs to be displayed. I
Tag: oracle18c
Oracle Analytical Function?
For the given table below, how can we find the customer whose name appears 3 times consecutively. Desired_Output Table Definition: Code Tried so far I believe we can do this by using lead/lag to get the previous and next row. Although my solution gives the desired output but i don’t think this is correct solution. Answer Your method is close.
How to joins in oracle based on condition
I have two tables as below: Table Apple: Table KEEY: Desired Output: Code Tried So far: This is giving me : I guess i need to use pivot instead of Union to get both the ids on same row. Have you ever encountered such scenarios? Any pointers to proceed will be very helpful. Thanks in Advance! DDL used for the
Remove duplicate values from string in oracle
I have requirement where I have input data like Output Required: Solution Tried: Output of the query: Can someone help here in removing repeating alphabets. Thanks Answer You can use a subquery:
Is it possible to use GRANT inside a trigger in Oracle 18c?
I try to create a trigger which automatically grants select on all new tables for a specific schema, whenever a new table in this schema is created. Background for this is IBM InfoSphere Information …
How can an Oracle-user query a table in another schema in oracle18c?
I want the oracle-user c##user2 to query the table test in the schema c##user1, but when I query the table, I get the message “no rows selected”. Both users have the permissions “CREATE SESSION” and “…
Display parent records that meet condition of child records
In oracle sql, imagine I have a table of game developers and a table of products sold by a game store. Imagine I am trying to select only game developers that have a total amount of products …
Oracle create a Pivot table from 3 columns
I’m trying to create an excel-like pivot table with 3 columns of information, order tpye, product code, and the income generated from that order. I’ve managed to get the generated income for every …