Here is a breakdown of the first question :
- Write a SQL statement that creates a stored procedure with one int input parameter.
- The stored procedure selects the supplierId field and the total of all Count field values for each group of supplierId's from the Part table.
- Only rows with their Count total, or sum, greater than the value specified in the input parameter should be returned.
(just FYI, it is good to break up questions to focus on one thing so you can get more direct answers -- but since you have all four already listed here guess you can take one at a time)
Now looking at the above, you have not satisfied requirement #1 and thus can't satisfy #3.
Just remember :
create procedure your_procedure_name
-- parameters list here
as
-- body of procedure here
Kevin





by: melissa0901Posted on 2009-11-01 at 10:13:30ID: 25714668
For the first one I have created this:
CREATE PROCEDURE PART
AS
SELECT Supplierid, SUM (Count)
Where Count>Parameter
GROUP BY Supplierid