Database Reference
In-Depth Information
Date: 9/1/2011
Change Log: Who, When, What
CMason,9/2/2011,fixed even more grammatical errors
*******************************************/
BEGIN -- the body of the stored procedure --
...
You can alter the stored procedure code to include the header using the ALTER keyword. When this code is
run, the new version of the stored procedure is saved in the database. Whenever the database is backed up, the
stored procedure will be backed up as well, making it easier to maintain your report queries.
exerCise 13-2. Creating stored proCedures
in this exercise, you create your own custom report stored procedure similar to the one discussed in this
chapter. This time, you include parameters that filter the results based on a start date and end date. Try
using building the query a little at a time, as described in this chapter. You may find that creating a report
procedure is easier than you think.
1.
Create a stored procedure that allows report users to filter the results based on a
range of dates using the code generated in Exercise 13-1.
Execute the stored procedure to verify that it works. (Your results should look like Figure 13-24 .)
if you get stuck, the answers for this exercise can be found in the example files for this topic. Look in the
folder for Chapter 13.
Figure 13-24. Results showing sales by store
in this exercise, you wrote a report query that captured sales data based on sales by stores.
 
Search WWH ::




Custom Search