Aktuelle Uhrzeit in Worten "ES IST SIEBEN NACH ZEHN" :-)

Denis

Benutzer
Beiträge
6
War mal so ne Idee von mir.
Die Light Version von QLOCKTWO. ;)
Viel Spaß damit.

select
TEXT1 || ' ' || MINUTEN || ' ' || STUNDEN || ' ' || TEXT2 UHRZEIT
from (
SELECT
'ES IST' TEXT1,
CASE
WHEN TO_CHAR(SYSDATE,'MI') = 1 THEN 'EINS NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 2 THEN 'ZWEI NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 3 THEN 'DREI NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 4 THEN 'VIER NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 5 THEN 'FÃœNF NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 6 THEN 'SECHS NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 7 THEN 'SIEBEN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 8 THEN 'ACHT NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 9 THEN 'NEUN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 10 THEN 'ZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 11 THEN 'ELF NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 12 THEN 'ZWÖLF NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 13 THEN 'DREIZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 14 THEN 'VIERZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 15 THEN 'VIERTEL NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 16 THEN 'SECHSZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 17 THEN 'SIEBZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 18 THEN 'ACHTZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 19 THEN 'NEUNZEHN NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 20 THEN 'ZWANZIG NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 21 THEN 'EINUNDZWANZIG NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 22 THEN 'ZWEIUNDZWANZIG NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 23 THEN 'DREIUNDZWANZIG NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 24 THEN 'VIERUNDZWANZIG NACH'
WHEN TO_CHAR(SYSDATE,'MI') = 25 THEN 'FÃœNF VOR HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 26 THEN 'VIER VOR HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 27 THEN 'DREI VOR HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 28 THEN 'ZWEI VOR HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 29 THEN 'EINS VOR HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 30 THEN 'HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 31 THEN 'EINS NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 32 THEN 'ZWEI NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 33 THEN 'DREI NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 34 THEN 'VIER NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 35 THEN 'FÃœNF NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 36 THEN 'SECHS NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 37 THEN 'SIEBEN NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 38 THEN 'ACHT NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 39 THEN 'NEUN NACH HALB'
WHEN TO_CHAR(SYSDATE,'MI') = 40 THEN 'ZWANZIG VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 41 THEN 'NEUNZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 42 THEN 'ACHTZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 43 THEN 'SIEBZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 44 THEN 'SECHSZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 45 THEN 'VIERTEL VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 46 THEN 'VIERZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 47 THEN 'DREIZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 48 THEN 'ZWÖLF VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 49 THEN 'ELF VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 50 THEN 'ZEHN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 51 THEN 'NEUN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 52 THEN 'ACHT VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 53 THEN 'SIEBEN VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 54 THEN 'SECHS VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 55 THEN 'FÃœNF VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 56 THEN 'VIER VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 57 THEN 'DREI VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 58 THEN 'ZWEI VOR'
WHEN TO_CHAR(SYSDATE,'MI') = 59 THEN 'EINS VOR'
END MINUTEN,
CASE
-- 1
WHEN (TO_CHAR(SYSDATE,'HH24') = 1 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'EINS'
WHEN (TO_CHAR(SYSDATE,'HH24') = 1 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ZWEI'
-- 2
WHEN (TO_CHAR(SYSDATE,'HH24') = 2 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ZWEI'
WHEN (TO_CHAR(SYSDATE,'HH24') = 2 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'DREI'
-- 3
WHEN (TO_CHAR(SYSDATE,'HH24') = 3 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'DREI'
WHEN (TO_CHAR(SYSDATE,'HH24') = 3 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'VIER'
-- 4
WHEN (TO_CHAR(SYSDATE,'HH24') = 4 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'VIER'
WHEN (TO_CHAR(SYSDATE,'HH24') = 4 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'FÃœNF'
-- 5
WHEN (TO_CHAR(SYSDATE,'HH24') = 5 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'FÃœNF'
WHEN (TO_CHAR(SYSDATE,'HH24') = 5 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'SECHS'
-- 6
WHEN (TO_CHAR(SYSDATE,'HH24') = 6 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'SECHS'
WHEN (TO_CHAR(SYSDATE,'HH24') = 6 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'SIEBEN'
-- 7
WHEN (TO_CHAR(SYSDATE,'HH24') = 7 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'SIEBEN'
WHEN (TO_CHAR(SYSDATE,'HH24') = 7 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ACHT'
-- 8
WHEN (TO_CHAR(SYSDATE,'HH24') = 8 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ACHT'
WHEN (TO_CHAR(SYSDATE,'HH24') = 8 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'NEUN'
-- 9
WHEN (TO_CHAR(SYSDATE,'HH24') = 9 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'NEUN'
WHEN (TO_CHAR(SYSDATE,'HH24') = 9 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ZEHN'
-- 10
WHEN (TO_CHAR(SYSDATE,'HH24') = 10 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ZEHN'
WHEN (TO_CHAR(SYSDATE,'HH24') = 10 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ELF'
-- 11
WHEN (TO_CHAR(SYSDATE,'HH24') = 11 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ELF'
WHEN (TO_CHAR(SYSDATE,'HH24') = 11 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ZWÖLF'
-- 12
WHEN (TO_CHAR(SYSDATE,'HH24') = 12 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ZWÖLF'
WHEN (TO_CHAR(SYSDATE,'HH24') = 12 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'EINS'
-- 13
WHEN (TO_CHAR(SYSDATE,'HH24') = 13 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'EINS'
WHEN (TO_CHAR(SYSDATE,'HH24') = 13 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ZWEI'
-- 14
WHEN (TO_CHAR(SYSDATE,'HH24') = 14 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ZWEI'
WHEN (TO_CHAR(SYSDATE,'HH24') = 14 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'DREI'
-- 15
WHEN (TO_CHAR(SYSDATE,'HH24') = 15 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'DREI'
WHEN (TO_CHAR(SYSDATE,'HH24') = 15 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'VIER'
-- 16
WHEN (TO_CHAR(SYSDATE,'HH24') = 16 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'VIER'
WHEN (TO_CHAR(SYSDATE,'HH24') = 16 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'FÃœNF'
-- 17
WHEN (TO_CHAR(SYSDATE,'HH24') = 17 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'FÃœNF'
WHEN (TO_CHAR(SYSDATE,'HH24') = 17 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'SECHS'
-- 18
WHEN (TO_CHAR(SYSDATE,'HH24') = 18 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'SECHS'
WHEN (TO_CHAR(SYSDATE,'HH24') = 18 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'SIEBEN'
-- 19
WHEN (TO_CHAR(SYSDATE,'HH24') = 19 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'SIEBEN'
WHEN (TO_CHAR(SYSDATE,'HH24') = 19 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ACHT'
-- 20
WHEN (TO_CHAR(SYSDATE,'HH24') = 20 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ACHT'
WHEN (TO_CHAR(SYSDATE,'HH24') = 20 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'NEUN'
-- 21
WHEN (TO_CHAR(SYSDATE,'HH24') = 21 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'NEUN'
WHEN (TO_CHAR(SYSDATE,'HH24') = 21 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ZEHN'
-- 22
WHEN (TO_CHAR(SYSDATE,'HH24') = 22 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ZEHN'
WHEN (TO_CHAR(SYSDATE,'HH24') = 22 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ELF'
-- 23
WHEN (TO_CHAR(SYSDATE,'HH24') = 23 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ELF'
WHEN (TO_CHAR(SYSDATE,'HH24') = 23 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'ZWÖLF'
-- 00
WHEN (TO_CHAR(SYSDATE,'HH24') = 0 and TO_CHAR(SYSDATE,'MI') between 0 and 24) THEN 'ZWÖLF'
WHEN (TO_CHAR(SYSDATE,'HH24') = 0 and TO_CHAR(SYSDATE,'MI') between 25 and 59) THEN 'EINS'

END STUNDEN,
case
WHEN TO_CHAR(SYSDATE,'MI') = 00 THEN 'UHR'
END TEXT2
FROM DUAL)
 
Werbung:
Zurück
Oben