SAP CTE comparing columns of same row condition is not working

1 month ago 9

I person recovered the reply with chatgpt..it was owed to my columns incorporate NULL values

3. Null Values

If either column1 or column2 contains NULL values, the examination volition not return TRUE because immoderate examination with NULL returns NULL. To handle NULL values, use IS NULL or COALESCE:

WITH cte_name AS ( SELECT column1, column2 FROM table_name) SELECT * FROM cte_nameWHERE COALESCE(column1, '') = COALESCE(column2, ''); 
Read Entire Article