Forum Discussion
Facing issue while referring query parameters in direct query
- 1 year ago
Hi Ashok_Gopeani,
The error ORA-00936 typically occurs in Oracle databases and indicates a missing expression in your SQL query. This error is often caused by an incomplete or improperly structured SQL query.
In Oracle, parameters are typically referred to with a colon (
:) before the parameter name, unlike SQL Server which uses@. So, change@cmrunidto:cmrunidfor Oracle.-
In Power BI Report Builder, after creating the parameter (
cmrunid), make sure that it is mapped correctly to the query. Oracle expects the parameter to be prefixed with a colon (:). -
Make sure that the Data Type of the parameter matches the Data Type of
cm_run_idin the database (e.g., ifcm_run_idis a string in the database, set your parameter data type to Text).
Try using
SELECT *
FROM table_name
WHERE cm_run_id = :cmrunid๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together! -
Hi Ashok_Gopeani,
The error ORA-00936 typically occurs in Oracle databases and indicates a missing expression in your SQL query. This error is often caused by an incomplete or improperly structured SQL query.
In Oracle, parameters are typically referred to with a colon (:) before the parameter name, unlike SQL Server which uses @. So, change @cmrunid to :cmrunid for Oracle.
-
In Power BI Report Builder, after creating the parameter (
cmrunid), make sure that it is mapped correctly to the query. Oracle expects the parameter to be prefixed with a colon (:). -
Make sure that the Data Type of the parameter matches the Data Type of
cm_run_idin the database (e.g., ifcm_run_idis a string in the database, set your parameter data type to Text).
Try using
SELECT *
FROM table_name
WHERE cm_run_id = :cmrunid
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!