Forum Discussion
SAP HANA DirectQuery SQL code
Hi all,
I am facing the following issue when trying to connect an existent query from SAP to PBI through the DirectQuery feature.
The code I am using is:
SELECT T0."itemcode",
T0."itemname",
T1."price",
T1."currency",
T2."price",
T2."currency"
FROM oitm T0
INNER JOIN itm1 T1
ON T0."itemcode" = T1."itemcode"
AND T1."pricelist" = 1
INNER JOIN itm1 T2
ON T0."itemcode" = T2."itemcode"
AND T2."pricelist" = 2
It seems that there is an issue with the sintaxe which I cant seem to figure.
Ps.: I have other queries working just fine but not this one.
Could you anyone give some light, please?
- Anonymous5 years ago
Anonymous
Is "oitm" a variable or a temporary table? If "oitm" is just a variable, you have to write ":oitm" (with the colon in front).SAP HANA will determine if and what needs to be materialized during run time.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Anonymous
Is "oitm" a variable or a temporary table? If "oitm" is just a variable, you have to write ":oitm" (with the colon in front).SAP HANA will determine if and what needs to be materialized during run time.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.