Oracle sql query to group two sets of dates if sequencials

I have the next table: EMPLOYEE CODE START_DATE END_DATE 02097368 F7H3 09/07/2018 20/10/2018 02097368 F7H3 21/10/2018 05/01/2019 02097368 F7H3 06/01/2019 12/01/2019 02097368 F7H3 13/01/2019 02/02/…

SQL Plus Columns getting overflowed to next row

The DeptNo column when using SQLPlus in Oracle 11g XE is getting pushed down to the next row, despite having sufficient space in the window in Ubuntu 20.04 Terminal.

oracle sql max value

i have a requirement, i need to find max only one val from each department,i need only one value even 2 person have same max value drop table tst; create table tst(val number,dept varchar2(20),name …

SELECT Data with logic created date not greater than

I have three tables with detail structure and data like this : Table TBL_REFERRAL ID CREATED_DATE USER_NAME REFERRAL_CODE ——————————————————— 1 …

Get the last login date for all users in Oracle 11g

We have Oracle 11g so the following query didn’t work. select USERNAME,LAST_LOGIN from dba_users Then I searched and people suggested multiple ways and i got confused. What is the correct way to get …

Passing date to Stored Procedure in Oracle SQL error : ORA-01858

I know this question has been answered previously, and I have tried out the solution given in them without success. I have a stored procedure as below(I have removed non-essential parts) : CREATE OR …

Joining table get the first data on first table if duplicate

Hi i have table1 and table2. table1 is the logtime table of employees and table2 is the groupcode of the employee. On table1 some employees has duplicate time in because they time in multiple time …

How can I read a very long BLOB column in Oracle?

I want to connect a Node Express API with an Oracle 11g Database which has a table with a BLOB column. I want to read it using a SQL query, but the problem is that the BLOB column can have a very long …

Editing the output (set brackets depending on the quantity retrieved and the semicolon)

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 …

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 …