Skip to content

Tag: oracle

All tables consisting of numbers less than a fixed number

I am trying to find out all the tables where table names consist of numbers less than a fixed number 16284961 at the end preceded by an underscore for example LOG_16282961. Sample User_segments table: Expected Output: Query: Using above query, although I am getting my result but additionally it also includes …

sort with special sort number

I have two tables, sort table and assign table SortID Name 0 A 1 B 2 C 3 D I want assign mission to everyone, start with a special sortID example: start with sortID 2, and change order next week. result as below: Date Week MissionA MissionB MissionC MissionD 2021/1/3 1 C D A B 2021/1/4 1 C D A

how to get start date of latest dept in which working

I’m trying to get the record of emp current working dept with start date Data, in below data Grp column is I’ve derived to get the 3rd last record, which is the correct result. query tried so far Am not able to think ahead, that how can I use Grp now to get 3rd last record as a output. Data

Oracle – get previous, current and next year from query [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year. Improve this question Is below example good solution for get previous, current and next year?…

Date Entry of SQL ORACLE

Here I am using Oracle SQL and I have a table with 2 columns, Keyword and Created_Date. Is there any way to get the 3rd column with information of next entry of 2nd column in accordance with first column? Thanks guys Answer Looks like the LEAD analytic function. Sample data in lines #1 – 10; query begin…