Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello,
While writing BI SQL in Sap Han with Power Query, I get an error while running DateDiff.
where saphanadb.zpf_t_006.WEEK =DATEDIFF(DAY, CAST( saphanadb.zpf_t_051.BEGDA AS DATE ),CAST( GETDATE() AS DATE ))
order by saphanadb.zpf_t_006.CRDAT desc
ODBC: ERROR [S1000] [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;260 invalid column name: DAY
Thanks you for help.
I opened a ticket to the SAP team and am waiting for a response for solution
Hi @Anonymous
This error message indicates the SAP SQL statement is not correct. Maybe you can try DAYS_BETWEEN Function (Datetime) | SAP Help Portal
In addition, I found the following threads from SAP Community. Hope they would be helpful. Otherwise you can also seek help from the SAP Community. Its members probably have more experience in this problem.
Solved: Over due days calculating based on sales invoice - SAP Community
How to find number of days between two given dates - SAP Community
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |