Every time that I run my code I obtain one, or two or several rows on a JSON format. I am using Oracle 11g. This is my CODE on SQL Fiddle, you will find all the data there. For example, in this case …
Tag: oracle11g
How to output row count calculations in Oracle’s SQL*Plus
I am using SQL*Plus with Oracle 11.2 and I know how to output the count of rows adhering to some condition, e.g.: Also it is easy to output all rows in MY_TABLE: However, how can I output in SQL*Plus the ratio of the two counts, i.e. how can I do in SQL*Plus a calculation on the output from SQL commands?.
How to break sequence
i have a table named sequence with a single column val and table looks like val —– 1 2 3 5 8 9 10 i need to identify the range of numbers if there is a break in sequence and output like …
Too many open connections on sending Email
I’m trying to send email to every users from DB. I use a loop to get the message text per user as I loop need to call the send_email. But I got an error saying: ORA-30678: too many open connections …
Transpose in ORACLE SQL (Convert 6 columns into 3 Columns)
I’ve an output like the below. I want that to be converted into the below Where ID is the count of TOTAL, HIGH, SENT, WAITING, DATE. I have been contemplating for a while and couldn’t get what I want. Can any one please help in ORACLE SQL? Thanks in advance. Answer Here’s one option:
Using Oracle SQL to join duplicate counts to an existing subquery
I have been asked to build a query that runs quality checks for data on a certain state test. I have the following query that creates a variable named ‘Flag’ to identify cases where there are issues. The main query is really in a subquery, and I filter out all records where there isn’t a flag by only selecting cases
Select statement inside for loop
I’m trying to put my select statement inside a for loop and after looping I want to insert the result on a table but upon my execution I bump in to this error. ORA-06550: line 5, column 7: PLS-…
I’m trying to know the country that pays the highest salary from
select last_name, country_name, SUM(salary) from employees e JOIN departments d ON (e.department_id= d.department_id) JOIN locations L ON (d.location_id = L.location_id) JOIN Countries Cc ON (L….
Oracle SQL data fetch order
I’m trying to achieve this Layout. I’m not sharing the query because it’s working, I’m just wondering what functions to use in order to achieve format ‘2’. In the beginning I was doing UNION ALL , that’s how I got format ‘1’. The data is fetched from multiple tables. I’m trying to achieve this without PLSQL. Thank you ! How
getting output of union all without using union all
I have been given a situation to find the common record between 2 tables without using union. I could do it. But I am not able to do ‘union all’. I mean I have to find out output of 2 table including …