We’ll achieve this by writing a dynamic SQL statement that will build the WHERE conditions based on the list of values that we will have in the Requested Sales Orders table. Refreshing the file see in the spreadsheet the new results within seconds? Just copy and paste the list of desired values into a table, and after Several different users? Wouldn’t it be nice if you (or your end user) could But what if you receive these requests 2-3 times a week from Manually write the WHERE conditions that include the Sales Order numberĪnd the year. Query the database and get the information requested, but you will have to 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: Dynamic SQL queries with Excel’s Power Query Use an excel table to modify your SQL query