Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
RobertSlattery
Resolver III
Resolver III

Native query on OLEDB source with parameteres doesn't work

I have a native query with a parameterised where caluse like this...

WHERE CALDATE > @datefrom AND CLDATE < @dateto

I try to query it 

let
    Source = OleDb.DataSource("provider=IBMDASQL.DataSource.1;data source=serverconnection),
    Database = Source{[Name="SERVER",Kind="Database"]}[Data],
    calendar = Value.NativeQuery(Database,Query1, [datefrom="20230701",dateto="20240701"])
in
    calendar

This results in a datasource error, Column or global variable @DATEFROM not found.

I guess the parameters are not being picked up by Value.NativeQuery.

If I remove the parameters from the where clause, or replace with literal values, it runs fine.

Is this not supported for OLEDB?

1 REPLY 1

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors