select * from tab1 where if (not
isnull(data_termine),'(DATEDIFF(now(),data_inizio) < 0) and
(DATEDIFF(now(),data_termine) > 0)','(DATEDIFF(now(),data_inizio) < 0)')
[cut]
dove sbaglio? Mi sembra scritta bene... "data_termine" è un datetime e
può essere NULL. Se ho campi null come posso risolvere?
Grazie!
> Cosě come l'ho scritta non mi visualizza nulla...
>
> select * from tab1 where if (not
> isnull(data_termine),'(DATEDIFF(now(),data_inizio) < 0) and
> (DATEDIFF(now(),data_termine) > 0)','(DATEDIFF(now(),data_inizio) < 0)')
>
> [cut]
>
> dove sbaglio? Mi sembra scritta bene... "data_termine" č un datetime e
> puň essere NULL. Se ho campi null come posso risolvere?
Dovresti indicare anche il database che utilizzi.
Scusa...MySQL 5.0