Hai am new to ms sql....some one please solve my problem here...:-
how to set a variable to zero when no raw is returned in a select query...
 
this is not working...
select @sales=isnull(amount,0) from Weekly_Full_Report_All where RMDTYPAL=1 and week1=@count;
 select @return=isnull(amount,0) from Weekly_Full_Report_All where RMDTYPAL=8 and week1=@count;
because here no raw is returned. How can i set the @sales,@return values when no raw is returned.....??????:0
 
...

Go to the complete details ...