X
X
Xvir432018-10-02 10:55:17
MySQL
Xvir43, 2018-10-02 10:55:17

How to write a request, I can not figure it out?

Tell me please, I can’t figure it out
, for example:
id date param
1 0 0
2 0 1
3 03,10,218 1
if param=1 and date =0 then enable recording in response
if param=1 date<>0 then enable recording in response if only date equal today!!!
how to do it????

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arman, 2018-10-02
@Arik

?WHERE param = 1 AND (date = 0 OR date = 'сегодня')

L
Light777, 2018-10-02
@Light777

So ?

SELECT *
  FROM tbl_tmpzzz
 where (zparam = 1 and zdate is null or
       zparam = 1 and zdate = trunc(sysdate))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question