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
yasmeenwilde
Advocate II
Advocate II

decimal parameter in custom sql when connecting to oracle from power query

Hello community members,

I'm looking for the correct syntax for decimal parameter. The below m script below works if rate is a text parameter. It produces an error if rate is a decimal parameter. The condition needs to be stringcol >= pID

This is a directquery connection. I have a huge table with million rows of data. I am trying to get a small subset of data into power query. I've googled and searched through the community. I found answers for text and datetime parameters but unable to find decimal parameter. Please help. 

 

let
pID=rate,
Source =
Oracle.Database("databasename",
[HierarchicalNavigation=true,
Query="SELECT * FROM schema.tablename#(lf) where stringcol='"&pID&"'"])
in
Source

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

let
Source =
Oracle.Database("databasename",
[HierarchicalNavigation=true,
Query="SELECT * FROM schema.tablename#(lf) where stringcol='" & Text.From(rate) & "'"])
in
Source

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

let
Source =
Oracle.Database("databasename",
[HierarchicalNavigation=true,
Query="SELECT * FROM schema.tablename#(lf) where stringcol='" & Text.From(rate) & "'"])
in
Source

Thank you so much @lbendlin this works when I changed the = to >=.

On my original script above, I received a syntax error when I changed = to >=.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

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