0
how can I do on SQL server a condition if the return of a field is null and it returns another condition
ISNULL( CONVERT(CHAR(08),C.PEDS_DAT_FAT,112), d.NFFE_DAT_ENT) BETWEEN '20180501' AND '20180530')
basically is the C.PEDS_DAT_FAT
it returns normal and if it is null it in my thought would have to go to the d.NFFE_DAT_ENT
but it does not bring the result
Please enter more information of the query. The
ISNULL
is in theselect
or in theWhere
?– Alexandre Cavaloti
Hello thank you, he’s in
where
.– Jameson
if
PEDS_DAT_FAT
for null, useNFFE_DAT_ENT
?– Rovann Linhalis
Yes more when I do it this way that is comes the null field with no date being that has record on condition of
Nffe_dat_ent
– Jameson
puts your whole query, and the structure of the tables. If possible make an example in Sqlfiddle
– Rovann Linhalis