Get current username in Power Query via LocalDB or SQL Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//LocalDB | |
UserNameLocalDB = | |
() => Sql.Database("(localdb)\v11.0","",[Query="SELECT SYSTEM_USER"]) | |
//LocalDB from SQL Server 2016 Express | |
UserNameLocalDB2016 = | |
() => Sql.Database("(localdb)\MSSQLLocalDB","",[Query="SELECT SYSTEM_USER"]) | |
//Local instance of SQL Server | |
UserNameSQL = | |
() => Sql.Database(".","",[Query="SELECT SYSTEM_USER"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment