• sharath.chalamgari (1/28/2011)


    but if i cange the Query with some where condition,where i will get only one Row (sample) then the stdevp will results the null value

    select stdev(pa_Rates) From Package where pa_PackageID = 1

    The WHERE clause is executed first, so you are still calculating the variance over 1 row, hence the NULL.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP