Forum Discussion

SakshiWalia_06's avatar
SakshiWalia_06
Frequent Visitor
2 years ago

Paginated Report parameter passing in query

Hi,

When using Oracle query in Power BI Report Builder (paginated report) I am able to use below syntax for passing date paramter value in Text Report query. :pFromDate

Used below steps to create parameters

 

But same syntax (:pFromDate) doesnt work if I use Redshift database. Getting below error.

"ERROR [42601][SAP][Amazon Redshift] (30) Error occured while trying to execute a query.[SQL State 42601][ERROR: syntax error at or near "

 

 

 

 

 

 

 

3 Replies

  • I'm not sure a parameter name starting with a colon is allowed. Does it help if you use pfromDate instead of :pfromDate in your query?

    • SakshiWalia_06's avatar
      SakshiWalia_06
      Frequent Visitor

      No, If we remove colon it treats as column from the table. Gives below error

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SakshiWalia_06 ,

    I'm not sure if the syntax is exactly the same for Oracle and Redshift, but the screenshot you provided of the error report is entirely due to a syntax error in the query statement you are using. Please look up the Redshift documentation and check your query code for syntax errors, especially in the more detailed areas like punctuation, where errors are more likely to occur.
    I would suggest you to run it in Redshift database first, and then copy it to Power BI Report Builder if you can run it successfully. For parameters, you can define one or two variables in the database to simulate the parameters of the whole paging report, so that you can avoid the whole problem.

    If you still can't solve it, please provide me with the Oracle query code that runs successfully.

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.