New "Type Conversion in Expression....." warning in SQL2012 ,to noisy to practical use - by Dave_Ballantyne

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


14
0
Sign in
to vote
ID 695556 Comments
Status Closed Workarounds
Type Bug Repros 4
Opened 10/18/2011 10:46:23 AM
Access Restriction Public

Description

Hi,

although i love the thought of the AffectingConvertWarning Types in 2012 ( Denali CTP3), i fear that they may be to noisy to be of practical use.

For instance this statement :

select SOH.SalesOrderID,SOD.SalesOrderDetailID,convert(char(10),SOH.SalesOrderID)
 from Sales.SalesOrderHeader SOH
join Sales.SalesOrderDetail SOD on
SOH.SalesOrderID = SOD.SalesOrderID


throws the warning.

I know the answer already ( :) ) , but can the warning be restricted to :
Predicates
Group by clauses
Order by clauses
etc.....
Sign in to post a comment.
Posted by Microsoft on 10/21/2011 at 3:08 PM
Hello Dave,
I see what you mean. While I agree that this is noise in most cases, it is low priority for us to fix. We will look at it if we get more feedback. For now I have closed this by design.

Thanks
Umachandar, SQL Programmability Team
Posted by Dave_Ballantyne on 10/20/2011 at 11:07 PM
Hi Umachandar,

Attached is a plan showing the warning

<Warnings>
             <PlanAffectingConvert ConvertIssue="Cardinality Estimate" Expression="CONVERT(char(10),[SOH].[SalesOrderID],0)" />
</Warnings>

Dave
Posted by Microsoft on 10/20/2011 at 2:02 PM
Hello Dave,
Thanks for your feedback. What error are you seeing upon running the query? I don't get any errors if I try it in AdventureWorks2008R2 database on a Denali CTP3. Please provide more details and repro steps so that we can investigate further.

--
Umachandar, SQL Programmability Team
Posted by Microsoft on 10/20/2011 at 1:59 PM
Hello Dave,
Thanks for your feedback. What error are you seeing upon running the query? I don't get any errors if I try it in AdventureWorks2008R2 database on a Denali CTP3. Please provide more details and repro steps so that we can investigate further.

--
Umachandar, SQL Programmability Team