
June 25th, 2004, 06:09 AM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 4
Time spent in forums: 6 m 11 sec
Reputation Power: 0
|
|
How to sum a column?
Hello !
Please HELP ME!
CREATE PROCEDURE Something
@Date1 smalldatetime,
@Date2 smalldatetime,
@My_Sum decimal output
AS
Select * from Table1 where MyDate >= @Date1 and MyDate <=@Date2
set @ My_Sum = select sum(My_Sum)
exec Something My_Sum output
How to make my procedure to return all records which dates are between date1 and date2 and to sum the column My_Sum for these dates
|