Is it possible to decide by IF Condition which Where Clause I want to choose.
Something like:
IF(DATE_FORMAT(DATE(akDate), '%a')='SAT', USE WHERECLAUSE1, USE WHERECLAUSE2)
This is the case you can still write using rather common WHERE
statement such as this:
... WHERE
(
(DATE_FORMAT(DATE(akDate), '%a') = 'SAT')
AND
(WHERECLAUSE1)
)
OR
(
(DATE_FORMAT(DATE(akDate), '%a') != 'SAT')
AND
(WHERECLAUSE2)
)
where, of course, you should replace WHERECLAUSE1
and WHERECLAUSE2
with appropriate conditions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With