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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors