Quantcast
Channel: SQLServerCentral » SQL Server 2012 » SQL Server 2012 - T-SQL » Latest topics
Viewing all articles
Browse latest Browse all 4901

Determenistic function returns undetermenistic. Why?

$
0
0
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.

Viewing all articles
Browse latest Browse all 4901

Trending Articles