1
I have the following appointment:
 SELECT 
    ROW_NUMBER() OVER(ORDER BY V.DATA ASC) AS ID,
    V.CHAPA AS CHAPA,
    F.NOME  AS NOME,
    V.DATA  AS DATA,
    CASE WHEN V.BATIDA IS NULL THEN 0 ELSE V.BATIDA END AS IS_NULL
        FROM
            ARELBATIDATRANSITOVIEW AS V
            LEFT JOIN V_DADOSFUNC  AS F ON V.CHAPA = F.CHAPA
      WHERE
          V.CHAPA = 2311 
            GROUP BY V.CHAPA,V.DATA,F.NOME,V.BATIDA
                HAVING IS_NULL = '1900-01-01 00:00:00.000'
              ORDER BY DATA ASC
Is returning the following message:
Message 207, Level 16, Status 1, Line 42 Invalid column name 'IS_NULL'.
that’s correct
IS_NULL? would not beis null??– novato
is_null was just the name I gave to the column, plus any name I put from the bug
– Chefe Druida