Hi Ankita,
First thing I am noticing is the query you are using :
WHERE BUSINESS_UNIT != ''
OR BUSINESS_UNIT != ' '
If your row has the following value
BUSINESS_UNIT = ' '
The result would be :
BUSINESS_UNIT != '' โ TRUE
BUSINESS_UNIT != ' ' โ FALSE
Even for an empty string:
BUSINESS_UNIT != '' โ FALSE
BUSINESS_UNIT != ' ' โ TRUE
That's why the unwanted record gets through.
My suggestion is tomake the condition even more explicit:
WHERE TRIM(BUSINESS_UNIT) <> ''
AND BU_DESCR <> 'Unassigned'
depending on your database (NULL could be different from an empty string or a space.)
WHERE BUSINESS_UNIT IS NOT NULL
AND TRIM(BUSINESS_UNIT) <> ''
=> This is a SQL problem not a Snaplogic issue based on the information you shared.