Hot answers tagged

6

Instead, try WHERE InsertedOn>=CAST(GETDATE() AS date) AND InsertedOn<DATEADD(day, 1, CAST(GETDATE() AS date)) This expression is sargable which is what you want for optimum performance. Like @Mikael indicates, you would do well to design one of your indexes so that InsertedOn is the first column, and that all the other columns used in the ...


2

Thanks Kin for pointing to Paul's Article.Earlier wherever I have scalar operators I used to see them assigned some value,but in this case,those values are calculated from below function.. GetRangeWithMismatchedTypes('2016-02-07 15:39:02.1000000',NULL,(6)) So scalar operator Expr1014 is assigned--2016-02-07 15:39:02.1000000 Expr1015 is assigned null ...



Only top voted, non community-wiki answers of a minimum length are eligible