Registriert seit: 27. Nov 2017
2.490 Beiträge
Delphi 7 Professional
|
AW: MySQL Funktion (z.B. YEAR()) gibt je nach DB unterschiedliche Typen zurück
5. Aug 2022, 18:24
Nur 'ne ganz blöde Idee:
SQL-Code:
SELECT
Cast(Concat(YEAR(V_Dat),"") as Signed) as yr,
Cast(Concat(MONTH(V_Dat),"") as Signed) as mn,
Cast(Concat(DAY(V_Dat),"") as Signed) as dy,
SUM(Anteil_I) sm
FROM
rpohis
WHERE
Tank_Nr = 20
GROUP BY
DATE(V_Dat)
ORDER BY
yr DESC,
mn ASC,
dy ASC
Mal mit sowas in der Art
SQL-Code:
SELECT
Cast(Concat(YEAR(sysdate()),"") as Signed) as yr,
Cast(Concat(MONTH(sysdate()),"") as Signed) as mn,
Cast(Concat(DAY(sysdate()),"") as Signed) as dy
auf MySQL Tryit Editor v1.0 ausprobieren.
|
|
Zitat
|