#”Combine” = Table.ToList(#”Removed Other Columns”,Combiner.CombineTextByDelimiter(“”)), Hello, stumbled on this post while having to create this for odbc subqueries similar to what you’re doing there. Just copy and paste the values into the “Sales_Orders” table and hit “refresh all”:Īnd see new results showing up in SECONDS! If a user has SELECT permissions to the database this is a good alternative for them to modify the statement without having to deal with writing code.
The final set of conditions should look like this: ( = 'XYZ' AND YEAR = 2000) OR ( = 'ABC' AND YEAR = 2001) OR ( = 'OPQ' AND YEAR = 2003)… We are almost there and now we need to put all those rows together. Now hit OK and this should be the result: Year is integer so we don’t have quotation marks around. Note that Sales Order Number is a string value so is wrapped in single quotation marks (just like it would be wrapped in a regular SQL statement). This should be the result when you add the columns (make sure you concatenate correctly by using the quotation marks ( “) and the & sign):
In this case, we need Sales Order and Year of the Order date to match what we have in each of the columns of our list of values
You need to select from the DB based on a long list of specific records. If you regularly run queries to any database in your workplace, chances are you have encountered a user request like this: Use an excel table to modify your SQL query