QUARTER/de
Jump to navigation
Jump to search
QUARTER(d) | ||
---|---|---|
DBMS | OK | Alternative |
Ingres | Ja | EXTRACT(QUARTER from d) |
MySQL | Ja | EXTRACT(QUARTER from d) |
Oracle | Nein | TO_CHAR(d,'Q') |
PostgreSQL | Nein | EXTRACT(QUARTER from d) |
SQL Server | Nein | DATEPART(QUARTER,d) |
QUARTER
QUARTER liefert das Quartal (3-Monats-Periode) aus einem Datumswert.
1. Quartal | 1. Januar | 31. März |
2. Quartal | 1. April | 30. Juni |
3. Quartal | 1. Juli | 30. September |
4. Quartal | 1. Oktober | 31. Dezember |
QUARTER(d)
In diesem Beispiel wird das Quartal des wk
-Datums ermittelt. Cliff Richard scheint das 4. Quartal zu bevorzugen. ;)
SELECT wk,
EXTRACT(QUARTER from wk) AS Quarter,
song
FROM totp
WHERE singer = 'Cliff Richard'
ORDER BY wk DESC
SELECT wk,
TO_CHAR(wk,'QUARTER') AS Quarter,
song
FROM gisq.totp
WHERE singer = 'Cliff Richard'
ORDER BY wk DESC
SELECT wk,
DATEPART(QUARTER,wk) AS Quarter,
song
FROM totp
WHERE singer = 'Cliff Richard'
ORDER BY wk DESC
SELECT wk,
QUARTER(wk) AS Quarter,
song
FROM totp
WHERE singer = 'Cliff Richard'
ORDER BY wk DESC
Siehe auch
- Funktion EXTRACT
- Funktion +(date)
- Funktion HOUR
- Funktion MINUTE
- Funktion DAY
- Funktion SECOND
- Funktion MONTH
Language: | [[:{{#invoke:String|sub|QUARTER/de
|1 |Expression error: Unrecognized punctuation character "{".}}|English]] |
---|