Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle list dates without weekends

-- All dates between 01/07/2021 and 15/07/2021 excluding weekends
SELECT CAL_DATE
FROM (
         SELECT to_date('01/07/2021', 'DD/MM/YYYY') + ROWNUM - 1 AS CAL_DATE
         FROM ALL_OBJECTS
         WHERE ROWNUM <= to_date('15/07/2021', 'DD/MM/YYYY') 
                             - to_date('01/07/2021', 'DD/MM/YYYY') + 1)
WHERE to_char(CAL_DATE, 'DY', 'NLS_DATE_LANGUAGE=AMERICAN') NOT IN ('SAT', 'SUN');
Comment

PREVIOUS NEXT
Code Example
Sql :: how to calculate number of days between two dates excluding weekends in oracle 
Sql :: mysql ip address 
Sql :: mysql to get column name in database 
Sql :: mysql compare datetime to another datetime 
Sql :: sql convert date to string yyyy-mm-dd 
Sql :: postgre sql create table 
Sql :: how to combine first and last nae into one columb sql 
Sql :: sql pad left 0 
Sql :: mysql milliseconds 
Sql :: how to retrive the today date sql 
Sql :: sql table 
Sql :: RowDataPacket 
Sql :: oracle list grants on procedure 
Sql :: check if has alpha characters sql 
Sql :: do postgresql 
Sql :: check index sql server 
Sql :: oracle difference between two dates in years 
Sql :: mysql kill 
Sql :: sql command to show all tables 
Sql :: how to lock table in mysql 
Sql :: alter table add column in sql server 
Sql :: sql distinct only one column 
Sql :: rename table sqlite 
Sql :: how to create external table in hive 
Sql :: rename a column in sql server 
Sql :: median mysql 
Sql :: calculate percentage in sql 
Sql :: mysql create procedure phpmyadmin 
Sql :: sql not in 
Sql :: htaccess allow index 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =