I've a query with a lot of WHERE conditions, but one of them needs to be dynamic. I need that one WHERE is applied only if the actual time is between 09:00 and 18:00. I.e.:
SELECT x,y from z WHERE
x = 'hello'
{ if time between 09:00 and 18:00 then }
AND y = 'world'
{ end if }
How to apply such a where condition?
Many thanks, Simon