Ich versuche, die folgende Abfrage auszuführen. Nicht sicher, welche Fehler ich tue:PostgreSQL-Intervallfehler
select min(p.start_timestamp AT TIME ZONE p.timezone AT TIME ZONE 'America/Los_Angeles') as Date,
'America/Los_Angeles' AS Timezone, sum(GREATEST(0, p.value)) as Value
from main.production_m p
where
p.start_timestamp AT TIME ZONE p.timezone >= '2017-02-18'
and p.start_timestamp AT TIME ZONE p.timezone < '2017-02-22' + INTERVAL '1 day'
gibt es die folgende Fehlermeldung:
ERROR: invalid input syntax for type interval: "2017-02-20"
LINE 5: ...and p.start_timestamp AT TIME ZONE p.timezone <= '2017-02-2...
Schätzen Sie Ihre Eingabe. Danke Karthey
'** '2017-02-22' **' Was machen diese Asterixe dort? – wildplasser
Ich entfernte es gerade jetzt –
''2017-02-22' + INTERVAL ('1 Tag')' oder ''2017-02-22' + INTERVAL '1 Tag' :: Intervall' – wildplasser