Writing a procedure that creates a query
The example in this section shows you how to write a procedure
with logic to "fill in" a template SQL statement to create
a query.
The sample procedure:
- Checks the day of the week
- Sets the values of the variables passed to the query if the
day is Friday
- Runs the query
