Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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.

 

 

gustavovalentim_0-1601539197932.png

 

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?

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@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.

View solution in original post

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.