on 2018 Sep 24 9:06 AM
Hello!
In PostgreSQL and MySQL exists 'is distinct from' operator (SQL:2003).
Is it possible to achieve the same functionality in SAP Hana?
It is very important for our usage, we have a large number of such queries.
Example: CONN_ID column is defined as nullable integer. I have to select rows where CONN_ID has changed (also to NULL or from NULL).
SELECT
A."MATNR" as a_material,
B."MATNR" as b_material,
A."CONN_ID" as old_id,
B."CONN_ID" as new_id
FROM "MATERIAL_CONN_VIEW" A full outer join "MATERIAL_CONN_LATEST" B on (A."MATNR" = B."MATNR")
WHERE
(A."CONN_ID" != B."CONN_ID"); /* <=> or 'is distinct from' ? */
Request clarification before answering.
1) indeed != means the same as NE
2) the COALESCE prevents from having null values.
anyway the explanation from Lars seems to answer to your question ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.