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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
DeBIe
Post Partisan
Post Partisan

Trying to pass two parameters to stored procedure

Hey all,

 

I think I tryed every possible solution on the web but I just can't get it to work and I decided to post my problem here before hitting my head to the wall multiple times.

 

I want to execute an stored procedure with two parameters. Adding one parameter works fine, but I can't get it done with two parameters. Any idea what is wrong with my code?

 

let
Source = Sql.Database(sqlserver, "Database_01", [Query="execute sp_BE_FindBatch '"&ClientName"', '"&BatchNumber"' CreateNavigationProperties=false])
in
Source

 

Thank you for your time.

 

Raoul

2 ACCEPTED SOLUTIONS
lukiz84
Memorable Member
Memorable Member

is it the same error when you remove 

 

, CreateNavigationProperties = false

 

?

View solution in original post

lukiz84
Memorable Member
Memorable Member

you're welcome - please mark my post as the solution 🙂

View solution in original post

10 REPLIES 10
lukiz84
Memorable Member
Memorable Member

is it the same error when you remove 

 

, CreateNavigationProperties = false

 

?

it's alive, IT's Alive, IT's ALIIIIIVE!

 

Thank you so much for saving my day.

This is the solution code for others who face the same problem

let
Source = Sql.Database(sqlserver, "Database_01", [Query="execute sp_BE_FindBatch '"&ClientName&"', '"&BatchNumber&"'"])
in
Source

lukiz84
Memorable Member
Memorable Member

you're welcome - please mark my post as the solution 🙂

lukiz84
Memorable Member
Memorable Member

You are missing the " after &BatchNumber"'

Hey @lukiz84 

 

Thanks for replying. Still I get an error

DeBIe_0-1658828098935.png

 

lukiz84
Memorable Member
Memorable Member

you need a comma before CreateNavigationProperties...

@lukiz84 

 

Still an error. Any idea?

DeBIe_0-1658828854290.png

 

lukiz84
Memorable Member
Memorable Member

ah sorry, it has to look like this:

 

let
  Source = Sql.Database(sqlserver, "Database_01", [Query="execute sp_BE_FindBatch '"&ClientName&"', '"&BatchNumber&"'", CreateNavigationProperties=false])
in
  Source

 

you have to Add "&" after ClientName and BatchNumber

@lukiz84 

 

Thanks. No errors in the syntax! Unfortunately I receive this expression error now. Any thoughts?

DeBIe_0-1658830699904.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (8,240)