I cannot bypass the concatenation dates in my select statement. How can I avoid the warning on the select shape in the execution plan ?

Shah 2015-06-25 15:23:45

I cannot bypass the concatenation dates in my select statement. How can I avoid the warning on the select shape in the execution plan ?

The warning message is "Type conversion may affect cardinality estimate".

Aaron Bertrand 2015-06-25 15:34:13
I can't see the query text because it's been anonymized (have you updated to the latest version, which vastly improves anonymization?), but what do you mean by concatenation? If you are only doing this on output, it should not affect cardinality. If it's in the where or join clauses, try CONVERT(DATE instead of converting to a string. For more specific help, please upload a non- or less-anonymized plan.
Shah 2015-06-25 15:50:19
Aaron Bertrand 2015-06-25 15:58:17
What are the data types of Deal.TradeDate, OpenWorkingDays.Date, Flag.NettingMode, and OperationHeader.NettingStatus?
Shah 2015-06-25 16:03:01
Deal.TradeDate -> DateTime
OpenWorkingDays.Date -> DateTime
Flag.NettingMode -> CHAR(1)
OperationHeader.NettingStatus -> SmallInt
Aaron Bertrand 2015-06-25 18:58:20
Ok so for certain change OperationHeader.NettingStatus IN ('1', '4', '5') to OperationHeader.NettingStatus IN (1, 4, 5). Next, instead of having SQL Server perform the concatenation, any chance you could remove those and have the presentation tier perform the concatenation? This reduces the complexity of the statement by a great deal and isn't really going to make the client-side code that much more complicated. For this specific execution of the query, I don't really see this warning as something you need to worry about anyway. YMMV.