on 05-23-2019 2:47 AM
I'm creating a report and I don't want the canceled journal entries to appear. I have this query below but it is working in SQL can anyone help me to convert it into HANA?
SELECT T0.TransId FROM OJDT T0 WHERE (T0.TransId not IN (SELECT T0.StornoToTr FROM OJDT T0 where t0.stornototr is not NULL)) AND (t0.stornototr is NULL)
IFNULL/ISNULL difference only neccessary if converting NULL field to some value, for example IFNULL(Field, ''). When making a WHERE clause that a certain field has to be NULL value to show result then correct syntax is "Field IS NULL". The below query should do the trick:
SELECT T0."TransId" FROM OJDT T0 WHERE (T0."TransId" NOT IN (SELECT T0."StornoToTr" FROM OJDT T0 WHERE T0."StornoToTr" IS NOT NULL)) AND (T0."StornoToTr" IS NULL)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Also change IS NULL to IF NULL for HANA query.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.