• Champagne Charly (2/23/2013)


    Hello,

    Has any idea why this is classed as non deterministic.

    DATEFROMPARTS(DatePart(yyyy,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)),DatePart(mm,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)),DatePart(dd,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)))

    DATEFROMPARTS is supposedly deterministic in 2012 however the above throws a deterministic error.

    Hope somebody can spot how to improve so it is.

    You didn't post the code for the function.

    If you want some help with this, post the code within code blocks so we can actually read it.