### How do you declare/modify Parameters in a query in Excel? [SQL]

38
views
0
3 months ago by
How do you make parameterized queries in Excel?

How do you tie parameters to cell values?

How do you edit/modify parameters once they are declared?
Community: Zimmer Biomet

3
3 months ago by
You can add a user parameter to your Excel file by utilizing the ? syntax in SQL. See below for an example:
select *

where
ih.sales_order_id = ?​

After setting your query, Excel will prompt for a cell-reference as your parameter.

Once you have finalized this, typing anything into that field will re-run the query referencing the field as the ? in your SQL. In this example, I have used sales_order_id 'BE1439'

To edit this, you can follow the path: Data --> Properties --> Connection Properties (the little box next to name) --> Definition -- > Parameters...

From here you can edit your parameters, rules and cell references.