Filtering with Parameters
A parameter is a method of adding a criteria to a query that can be used to filter and reduce the result set.
- Queries that pull a large amount of data over time can take a long time to process
- One way to optimize data is by specifying a parameter in the query
- filters the data before the result set is run, showing only what you need in the results
- user who runs the query can either:
- manually add values to the parameter
- or these values can be pulled from another place in the software, leveraging the back-end design
- benefit:
- start your work with just the data that you need
- versus bringing all of it into a tool like Tableau and filtering the data there
- start your work with just the data that you need
- can develop parameters into reports that prompt you to enter information
- then used to pass data back to the command that filters the data
- allows you to run different data sets from a single report by changing the parameters
- enables you to maintain one report for multiple uses
- process of parameterization can vary depending on the software used
- can be directly coded in SQL statements or stored procedures to read data