Wpis z mikrobloga

via Wykop Mobilny (Android)
  • 0
Chciałbym żeby w selecie były pokazane wyniki tylko z datą rejestracji między Dzien-1 06:00 do aktualny dzień 06:00

Jak to najprościej ogarnąć?
Oracle sql
#sql
  • 7
via Wykop Mobilny (Android)
  • 0
@tallman: okej, ale to jest powiedzmy że, na sztywno bo wrzucasz wczorajszy dzień. Jak zrobić żeby select pokazywał dane za D-1 06:00 - dzień aktualny 06:00 niezależnie kiedy go odświeżę?

Próbowałem zrobić tak:

Datreg between to_date(sysdate || ' ' || '06:00:00', 'DD.MM.YYYY HH24:MI:SS') -1 and to_date(sysdate || ' ' || '06:00:00', 'DD.MM.YYYY HH24:MI:SS')
Ale niestety mam błąd
@tallman: chyba Cognos IBM mnie nie lubi, bo ciągle mu się coś nie podoba.

QE-DEF-0260 Parsing error before or near position: 69 of: "[Sta RegDateTime] between (trunc(sysdate-1)"

QE-DEF-0261 QFWP - Parsing text: [Sta RegDateTime] between (trunc(sysdate-1)) and (trunc(sysdate))

QE-DEF-0260 Parsing error before or near position: 69 of: "[Sta RegDateTime] between (trunc(sysdate-1)"

QE-DEF-0261 QFWP - Parsing text: [Sta RegDateTime] between (trunc(sysdate-1)) and (trunc(sysdate))