Assignment 9

Functions, stored procedures

1. Create a scalar function that returns the percent of a donation that goes to charitable activities (90%) when passed a donation amount as a parameter

2. Create another function like the previous one to show how much goes to the orgainization(10%)

3. Use both statements in a select statement

4. Create a stored procedure that returns the name, address, contact information, and donations for a donor given the donor's personkey

5. Create a stored procedure that returns the name, address, service type name and grant information when given the servicegrantkey as a parameter