| Author: Babu Akkandi 11 Jan 2009 | Member Level: Diamond | Rating:  Points: 3 |
Hi,
use this procedure,
alter procedure dd ( @c int output ) As Begin
Declare @a int Declare @b int set @a= (select count(*) from holiday where a_year='2009-2010') set @b= (SELECT DATEDIFF(day,Begin_date,Getdate())Totaldays from school_registration) set @c=@b-@a End
To test this procedure thru query analyser, use the following query
Declare @d int set @d = 0 exec dd @d output select @d
Hope It Helps!
Thanks and Regards, Babu Akkandi Microsoft Technology
|
| Author: Dhaval Shah 12 Jan 2009 | Member Level: Gold | Rating:  Points: 2 |
alter procedure dd ( @c int output ) As Begin
Declare @a int Declare @b int set @a= (select count(*) from holiday where a_year='2009-2010') set @b= (SELECT DATEDIFF(day,Begin_date,Getdate())Totaldays from school_registration) set @c=@b-@a End
|