I am trying to do a HTML table but i am having troubles where it does not return a value. This example shows my result.Sample Image
Is it possible to script that if there isnt any result, it will return 0?
I tried ISNULL
method and it does not return me any values.
I am expecting that by using the ISNULL
method, it will return a 0 in the result, but it doesn't do so.
SELECT
ISNULL(body, 0)
FROM
[EMAIL_MATRIX]
WHERE
body NOT IN (SELECT c.Body
FROM [dbo].[EMAIL_DETAILS] a
INNER JOIN [Email_matrix] c ON SUBSTRING(a.Subject, 5, LEN(a.Subject) - 4) = c.Subject
AND a.Body LIKE CONCAT('%', c.body, '%')
WHERE CAST(a.Send AS DAte) = '2022-10-04')