I am trying to define ODBC data source for Power BI Destop and use parameters in it. So - I have ODBC DSN for the Firebird (defined in the "ODBC Data Source Administrator (64-bit)") and I can successfully import full tables from this ODBC in the Power BI Destop.
Now I am trying to use custom SQL statement with the parameters for the definition of the data source for Power BI Destop.
I am doing: 'Get data from another source' and select 'Other - ODBC' and I enter the following SQL statement in 'Advanced options - SQL statement (optional)':
select s.sale_id, s.sale_date, sl.good_id, sl.price, sl.amount
from sale_lines sl
left join sales s on (sl.sale_id=s.sale_id)
where s.sale_date>=:from_date and
s.sale_date<=:to_date
I have also tried to use @form_date
, ?from_date
formats for the definition of the parameters. But in all cases I am getting different error messages:
Details: "ODBC: ERROR [HY000] [ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -206
Column unknown
FROM_DATE
At line 4, column 26"
Details: "ODBC: ERROR [HY000] [ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -104
Token unknown - line 4, column 25
@"
Details: "ODBC: ERROR [HY000] [ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -104
Token unknown - line 4, column 26
from_date"
So, my question is - how to defined parameters for the SQL statement that I am building for the definition of ODBC data source for the Power BI Destop. I am using Firebird 2.1/3.0/4.0.