Hi Thanks for your reply..
my requirement is,
if I execuite above i will get an error as Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
but I want top value( ie A/datediff(dd,getdate(),getdate()), I want ans as A)
the date diff is 0, but we have to make it as 1, so that I will get top value as 21.