Forum Discussion
pzawodzinski
Jun 12, 2020Copper Contributor
Excel mysql pass parameters
Hi. I try connect exel to mssql serwer. Connections work great except WHERE clause. This is my simple query : SELECT * FROM EMPLOYERS WHERE ID > 100 How I can pass where condition in this case 10...
SergeiBaklan
Jun 13, 2020Diamond Contributor
If ID in some named cell as here
you may use it in query like
let
GetID = Excel.CurrentWorkbook(){[Name="ID"]}[Content][Column1]{0},
queryString="SELECT * FROM EMPLOYERS WHERE ID > " & Text.From(GetID)
//Źródło2 = Sql.Database("localhost\sqlexpress2019", "SZKOLENIE", [Query=queryString])
in
queryString