SELECT _cotM.Customer_ID, _cotM.Material_ID
FROM dbo.COT_Monthly AS cot
INNER JOIN
dbo.vw_Dim_Material AS matr ON cot.Material_ID = matr.Material_ID
GROUP BY _cotM.Customer_ID, _cotM.Material_ID
I have sql code and have result 25855 rows
but when i add where matr.Brand <> '%VIT%' upper group by the result still 25855 rows.
but when i delete wildcard where matr.Brand <> 'VIT' the result became 25089.
i wandering why the result like this ?
is i am wrong using wildcard or else?
Thanks for answering.
Wildcards only work with
LIKEclauses, so change the condition: