I have the following problem , I'm doing a select with multiple where. example:
select isnull(fechamov,0)
from movimientos
where (provedor='1000' and depto='20') or
(provedor='1001' and depto='200')
result:
|fecha de movimiento|
|2015-02-20|
the problem is that in some cases do not have dates , consultation with 100 different Where just throws me 90 dates , the other 10 do not exist. I want to do is this:
select isnull(fechamov,0)
from movimientos
where (provedor='1000' and depto='20') or
(provedor='1001' and depto='200')
result:
|Fechamovimiento|
|0|
|2015-02-20|
and try isnull , coalesce , to replace the null results, with 0 but does not. there any way to fix this?