Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am unable to connect to HANA using DirectQuery. it gives me following error message:
ODBC: ERROR [42000] [SAP AG][LIBODBCHDC DLL][HDBODBC] Syntax error or access violation;257 sql syntax error: incorrect syntax near "begin": line 3 col 8 (at pos 27) - (screenshot below)
Here is the first few line of the code:
do begin
DECLARE EventID INT=136;
DECLARE zoneminutes INT=0;
DECLARE EventStartDate NVARCHAR(50)='';
PS: I have full permissions to database I am tying to access here but somehow it does not work.
I am not sure if Power BI can call such type of queries. Any assistance would be of great help.
Solved! Go to Solution.
Hi @v-jiascu-msft, Thank you for your response.
I tried that but it didnt work out, so I created a function of the HANA query and have called the same function in the PowerQuery. It works flawlessly now.
I was able to solve the error by marking EnableFolding=False
Go to Source --> Under PowerBI native query, mark EnableFolding=False:
Hope this helps.
Hi @rudra_deep,
Can you run the SQL statements in another tool of SAP HANA? Maybe you can try to store the procedure and call it directly in Power BI.
Best Regards,
Dale
Hi @v-jiascu-msft, Thank you for your response.
I tried that but it didnt work out, so I created a function of the HANA query and have called the same function in the PowerQuery. It works flawlessly now.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
80 | |
60 | |
35 | |
35 |
User | Count |
---|---|
100 | |
60 | |
56 | |
46 | |
41 |