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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Using SQL Server will connect without the Database Name but I need to use the Database Name

  I am trying to connect to a SQL Server Database the Server name is long and the Database Name is long... I can connect when I leave the Database Name off ... but I need to populate since I have a query so I can do all the joins in sql ... 

 

I tried updating using the Advanced Editor ... but it gives the following error 

 

Expression.Error: 3 arguments were passed to a function which expects between 1 and 2.
Details:
Pattern=
Arguments=[List]

 

Advanced Editor (  Changed Server and Database Name ) 

let
Source = Sql.Databases("lanteria.database.windows.net", "ESDB_xxxxxxxxxxxxxxxxxxxx"
, [Query= "SELECT emp.[Id] ,emp.[Account] FullEmpName FROM [LanteriaHR].[Employees] emp" , CreateNavigationProperties=false])
in
Source

 

thanks 

Kathy

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You have an extra "s" in the code. 

 

Should be:

 

let
Source = Sql.Database("server", "database", [Query="select count(1/0) [sanity test]", CreateNavigationProperties=false])

in Source

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

You have an extra "s" in the code. 

 

Should be:

 

let
Source = Sql.Database("server", "database", [Query="select count(1/0) [sanity test]", CreateNavigationProperties=false])

in Source

Anonymous
Not applicable

 @lbendlin   

 

Thanks that solved it...  

@Anonymous   However - this brings up a really good question.  Why didn't I know about SQL.Databases() and is that something that would work on the gateway?  Given the right permissions that would allow to have just one connection per server, not (like now) one per database.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors