I have a requirement below. Now I have to get output like below How can this be achieved ? I have written the below SQL but parent_position_id is coming, not parent_position_code select hapf….
Tag: oracle11g
Conditional ROW_NUMBER() to skip nulls still counting them
I am trying to add a ROW_NUMBER column to a data set that follows the order of [Withdrawal then Fee; Withdrawal then Fee] based upon whether the column NETWORKCD is null. However, my row_number formula is still counting Nulls even though it’s not displaying the numbers, like so: I am using the following formula for PeriodCount I was expecting PeriodCount
Select JSON object that appears more than one time
I am trying to write a query to return all trains that have more than one etapesSupervision. My table has a column called DETAIL, in this column I can find the JSON of my train. “nomTrain”: “EVOL99″…
How to search if a row is a substring of another row of the same column in Oracle
I have a table that contains millions of rows for names of customers as a column. I want to find if a part of a name exists within another row in the same column. E.g. If a row has value ‘Roger …
Oracle 12 SQL – ORA-00933, ORA-0923, ORA-00979 What am I doing wrong?
I am currently facing a bit of a wall, I am attempting to take information from two different tables, have them displayed side by side with the information recording by count. One being the total …
How to simplify nested select in where clause?
I have 4 tables EMPLOYEE, COMPANY, WORKS and MANAGES. The tables are defined as follows- I need to find all the employees who live in the same city as the company for which they work. So far I have done this. It’s working fine. But I want to know is there any simpler way to do this query? Answer You
Count on case Oracle
WE have below data in oracle database – I want count on column two in such a way that – Ouput – Best Regards Answer Thanks Guys. But I could do this way – Thanks for your replies
Can only find table in Oracle SQL when surrounding the table name with double quotes. Why?
I’m having the following weird issue with Oracle SQL. I have a table called schema_version, but I can’t run simple selects over it: > SELECT * FROM schema_version; ORA-00942: table or view does …
Find out available days and slots for doctor appointment
I have three tables: TimeSlotToken is the number of patients a doctor will see in his TimeSlot. TimeSlot 1, 2, and 3 are Morning, Afternoon and Evening respectively. I need to find the days where the TimeSlot is not full, i.e TimeSlot token is less than total bookings on that particular day and that slot. Since each doctor may have
How to automate source control with Oracle database
I work in an Oracle instance that has hundreds of schemas and multiple developers. We have a development instance where developers can integrate their work before test or production. We want to have source control for all the DDL run in this integrated development database. Currently this is done through a product Red Gate which we run manually after we