I run two SQL queries: The first one have an outer reference to the table inside subquery. In the second one I add the same table inside subquery. The results are different, it fails due to multiple …
Tag: oracle
ORA-00945: specified clustered column does not exist
here’s the code with the cluster included, the table never gets created and oracle documentation is ass create cluster c123 (a integer) size 512; / drop table t123; / create table t123 cluster c123 …
A function that returns different column values based on input
Here is a table FRUITS – FILTER A B C Apple 0 3 6 Orange 1 4 7 Apricot 2 5 8 Is it possible to create a function that returns column A for apple (0), B for Orange(4) and C for …
Results from multiple queries as one result in Oracle
I have results from same query with multiple conditions as shown below: SELECT COUNT(DISTINCT CASEID) FROM MYTABLE WHERE YR=2019 AND STATUS IN(‘W’) SELECT COUNT(DISTINCT CASEID) FROM MYTABLE WHERE …
Oracle Query to derive all Id’s whose balances have increased from consecutive 3 months along with there growth percent
I wanted to extract all id’s that have increased balances from last consecutive 3 months, and also display their growth percent sample data set– not all Id’s will have consecutive 3 months of data. …
Recursive query design – Oracle SQL
I am looking to create a recursive query that is able to completely map a series of replenishments, to a top level requirement. Below is some detailed information regarding my problem statement: I …
INSERT INTO failing on SQL Fiddle
I am trying to create a SQL Fiddle for creating a test database. My query is below: — schema CREATE TABLE tblInputs ( Type VARCHAR(256), Order_No VARCHAR(256), Planned_No VARCHAR(256), …
Oracle Compound Trigger : PLS-00103 Encountered when Attempting to get Max of Date Column
I am trying to construct a trigger that will update Table B with Max value end_date column when the corresponding end_date of table A is updated. This is so I can calculated and save the date …
How to remove one or more instances of ‘?*’ in a string using REGEXP_REPLACE function in oracle?
I’m getting the characters ‘?*’ one to three times in a column called Line. I am required to remove these characters. How do I do it using Replace or REGEXP_REPLACE? SELECT Line, REGEXP_REPLACE(…
Loading data from CSV file to oracle table using sql loader
i want to load the data from CSV file to oracle table with this below condition. if the table is empty then only the data should be loaded into table otherwise data should not be loaded. is this …