Does this return the correct result ?
Select * from tbl1 WHERE COALESCE([TextCol],'-1') NOT LIKE '%TAX%'
I believe NULL
values are the issue here, if the column contains them, then NULL NOT LIKE '%TAX%'
will return UNKNOWN/NULL
and therefore won’t be selected.
I advise you to read about handling with NULL
values , or here.
As @ughai suggested, if performance is an issue you can also use:
Select * from tbl1
WHERE [TextCol] NOT LIKE '%TAX%'
OR [TextCol] IS NULL