Forum Discussion

Charu's avatar
Charu
Post Patron
8 years ago

How to pass Oracle SQl query Parameter using Direct query mode in PBI Desktop

Hi Everyone,

 

Someone, please help me to resolve the below issue

 

the following query I need to pass while connecting Oracle Datasource direct query mode

select * from demo_tbl where trunc(trx_date) BETWEEN TO_char (:p_from) and to_char(:p_to)
 
I'm getting the following error Details: "Oracle: ORA-01008: not all variables bound"
 
For Your Reference please look at the below image
 

 

3 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Charu,

     

    Is the "_from" the parameters of Power BI? If so, I'm afraid this isn't supported by now. Please vote up this idea or create a new one.

    What does this query do? Maybe there are other approaches.

     

    Best Regards,

    Dale

    • Charu's avatar
      Charu
      Post Patron

      Those parameters are date params when I give specific from and to date only those records will retrieve from the table and I just want to use that data in my power bi report.

       

      Instead of extracting all the data from the table by passing these parameters Would like to achieve it.

       

      not only date parameter I'm talking about, in Oracle SQL query we used to pass lots of parameters as well, whether power bi desktop supports this? 

    • Charu's avatar
      Charu
      Post Patron

      Hi v-jiascu-msft

       

      colonp_from (: p_from) is an Oracle parameter the same I'm passing in power bi SQL query statement