Skip to content
Advertisement

Tag: oracle

Select configurable column names in Oracle SQL

I have a table with configurable column names which I can query like this: This is how ‘my_config’ tables looks like. My other table would look like this: However, I would be looking to select only those columns that the query above returns in my other table, kind of like the below: How could I achieve this? Expected result: Answer

How to delete more than one node with xml-query

with this code, I can remove one node (field_without_interest) of this xml element. But I would like to remove two nodes now( field_without_interest and PERSON_NUMBER). I have tried to place the for loop at differents places (You can see that in code. But I don’t think it useful to for to write every attemps in stackoverflow) but to no avail.

Which metrics to compare when evaluating SQL query performance?

I recently watched an online course about oracle SQL performance tuning. In the video, the lecturer constantly compares the COST value from the Autotrace when comparing the performance of two queries. But I’ve also read from other forums and websites where it states that COST is a relative value specific to that query and should not be used for an

How to get list of ids into separate column

Problem statement: I have a table master_tab which consist of two columns e_id and owner_id. I want to list down the e_id’s which belong to owner_id 72 and 73. There is another condition that analysis_comp flag should be 1 in the table transaction_tab. My attempt: Tool used: SQL Developer(18c) Current Output: Expected Output: Is it possible to get only the

From keyword not found where expected error in oracle

Need to create a temporary table employee by inserting values from already created table person which belongs to people database but getting error from keyword not found where expected Answer You’d then use CTAS (Create Table As Select), not an invalid INTO clause; it is used for different purposes. Based on comment you posted, there are several options you might

Need to get appropriate/expected row number in Oracle PLSQL

Getting the following output when i use the below query But the expected output should be as below (Refer RowNumber column) Answer First find “groups” each of those rows belongs to (partitioned by refnum and name) (that’s what the temp CTE does), and then apply dense_rank to fetch the final result. Sample data (simplified, as I don’t have your tables):

Advertisement