null check on substring

Asked

Viewed 46 times

0

I need to have a check in case I don’t have a comparison with some null value, I’m not able to make it work this condition.

AND SUBSTRING(CAST(CONVERT(NVARCHAR(10),LE.DTHREMPRESTIMO,103) AS VARCHAR),4,2) = CAST(SUBSTRING('11/2018',1,2)AS VARCHAR)
AND SUBSTRING(CAST(CONVERT(NVARCHAR(10),LE.DTHREMPRESTIMO,103) AS VARCHAR),7,4) = CAST(SUBSTRING('11/2018',4,4)AS VARCHAR)

That is a condition of WHERE. Could someone help me?

  • Something like: LE.DTHREMPRESTIMO NOT NULL AND?

  • tried AND LE.DTHREMPRESTIMO IS NOT NULL, did not work for my case..

  • But then what is resulting in NULL? Maybe it’s not this field?

  • I was putting it in the wrong place, I’m still young and it was difficult to put kkk as an answer so I confirm her?

1 answer

1


AND LE.DTHREMPRESTIMO IS NOT NULL

Browser other questions tagged

You are not signed in. Login or sign up in order to post.