Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle winter time change

ALTER SESSION SET NLS_LANGUAGE=english; -- First day of week
SELECT 
	NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/10/' -- Last Sunday of October 02:00
        || (EXTRACT(YEAR FROM SYSDATE)-5 + level) || '02:00:00'), 
           'DD/MM/YYYY HH24:MI:SS')) - INTERVAL '7' DAY, 'SUNDAY') AS H_WINTER,
	NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/03/' -- Last Sunday of March 02:00 
		|| (EXTRACT(YEAR FROM SYSDATE)-5 + level) || '02:00:00'),
		'DD/MM/YYYY HH24:MI:SS')) - INTERVAL '7' DAY, 'SUNDAY') AS H_SUMMER
FROM DUAL CONNECT BY level <=10;
-- ⇓ Test it ⇓ (Fiddle source link)
Comment

PREVIOUS NEXT
Code Example
Sql :: allow all local clients (local socket connections) to connect to the kodekloud_db1 
Sql :: use mysql 8 without password 
Sql :: sql shell psql cannot enter password 
Sql :: db connection using sql client in dot net 
Sql :: PDOException: SQLSTATE[HY093]: Invalid parameter numb 
Sql :: SQL BETWEEN OPERATOR With Texts 
Sql :: Oracle Function execution 
Sql :: java input type sql date 
Sql :: script to run SP_SPACESED on all tables in DB 
Sql :: mysql find char in string 
Sql :: db2 foreign keys 
Sql :: sql multiple column 
Sql :: oracle sqlp update amount / quantity 
Sql :: get total and distict row diff in sql 
Sql :: QUERY JPQL 
Sql :: Character Limitation in sp_executesql sql server 
Sql :: SQL IN Operator With Duplicate Values 
Sql :: sql xampp gabungan nama awal dan akhir 
Sql :: mysql connect error 
Sql :: how to create an SQL save method in ruby 
Sql :: sql count return 0 if no rows 
Sql :: Fatal error: Uncaught mysqli_sql_exception: Unknown or incorrect time zone 
Sql :: join creating duplicate columns sqllite 
Sql :: ALV GRID events 
Sql :: valadate mysql 
Sql :: triggers in mysql 
Sql :: get all employees if name ends with in sql 
Sql :: SQLServerException.makeFromDatabaseError 
Sql :: como hacer una consulta de un registro que no esta en una tabla en mysql 
Sql :: MySQL can’t specify target table for update in FROM clause (Updating same table from same select inner join table) 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =