So I have a SSIS package that uses an expression to replace some text with '' and then this is loaded into the database.
If I do a select query in the table in SSMS such as;
SELECT * FROM xxx
WHERE Email IS NULL OR Email = ''
It returns no results although I can visually see there are records with a blank Email field.
I have also tried;
SELECT * FROM xxx
WHERE (LEN(ISNULL(Email,'')) = 0);
My SSIS expression;
LOWER(REPLACE([Email],"Â",""))
Are there any solutions?
EDIT - As stated below, I have casted the field as varbinary and they have a value of 0xA0.
EDIT 2 - The answer that worked for me was WHERE EMAIL LIKE '%' + CHAR(160) + '%'