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 know, it could just be that I am physically tired after work four youth soccer games today, but I look at what is posted and have to ask, what are you trying to accomplish? What is with all the DATEADD and DATEPARTs doing to the value in Date_received? What is the purpose of this piece of code?