Forum Discussion
Advanced Editor from SQL Database
- 8 years ago
this is where you will put your query:
Hi,
I created a DIRECT QUERY to a SQL database to bring in large amounts of refinery production rate data. I want the query only to bring in certain stream id's and not show all the steam id's. So, when I click "Get Data" select the SQL table and rt click it I get an "Edit" option and it brings up the "Query Editor" and when I click "Advanced Editor" I get a window that looks like quasi-SQL language (please see below). In the table is a column called "Stream IDs" and I want to write into the query so it brings back only Stream Ids "1,2,3,4,5,6" abd et cetera. How do I write that?
let
Source = Sql.Databases("server_name"),
Servername2 = Source{[Name="Servername2"]}[Data],
dbo_table_name = Servername2{[Schema="dbo",Item="dbo_table_name"]}[Data]
in
dbo_table_name