Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everybody!
i want to import data from a datacube in SAP BW and select a time period after december 2017 and all products, except 'MNPZ'.
Time period in SQL where clause is working, but not my product selection. To realize a "not equal" expression, i used "<>", "!=" and "NOT x=y"
This is my code, please help if somethings wrong.
LOAD
PRDCTH0CS,
SALES_1R1,
NET_VA09T,
[0CALYEAR],
[0CALMONTH2],
[0CALDAY],
[0CALMONTH]
;
SELECT
[PRDCTH0CS],
[SALES_1R1],
[NET_VA09T],
[0CALYEAR],
[0CALMONTH2],
[0CALDAY],
[0CALMONTH],
FROM RLICVERT
WHERE
[0CALMONTH] > 201712 AND
[PRDCTH0CS] <> 'MNPZ'
;
thanks
BR
Chris
Hi @wlpike ,
This depends on your database syntax, but you can do it from Qlik... See below
LOAD
PRDCTH0CS,
SALES_1R1,
NET_VA09T,
[0CALYEAR],
[0CALMONTH2],
[0CALDAY],
[0CALMONTH]
WHERE PRDCTH0CS <> 'MNPZ';
SELECT
[PRDCTH0CS],
[SALES_1R1],
[NET_VA09T],
[0CALYEAR],
[0CALMONTH2],
[0CALDAY],
[0CALMONTH]
FROM RLICVERT
WHERE [0CALMONTH] > 201712;
Regards,
Ezir
Hi @wlpike ,
This depends on your database syntax, but you can do it from Qlik... See below
LOAD
PRDCTH0CS,
SALES_1R1,
NET_VA09T,
[0CALYEAR],
[0CALMONTH2],
[0CALDAY],
[0CALMONTH]
WHERE PRDCTH0CS <> 'MNPZ';
SELECT
[PRDCTH0CS],
[SALES_1R1],
[NET_VA09T],
[0CALYEAR],
[0CALMONTH2],
[0CALDAY],
[0CALMONTH]
FROM RLICVERT
WHERE [0CALMONTH] > 201712;
Regards,
Ezir
Hi Ezir,
thanks, it worked.
could there be a negative impact, if i do a where clause in "load" and not in "Select" statement?
and why should it not be possible to do a simple SQL where clause...
thanks
br
Chris
Addition:
from Qlik Script Generator i got following code that works too, but i still get product 'MNPZ' in Dashboard, but without data, so value of sold products is "0".
WHERE (
[PRDCTH0CS] <> MNPZ,
[0CALMONTH] > 201712
);
could this be a bug of some kind?
thanks
br
chris