SQL Cast versus Convert: CAST should be first choice

I've always been a fan of CONVERT because of datetime CONVERT takes in a style argument and allows me to format the string quickly.  I have since learned that CAST is the standard SQL, and should be first choice of use.

Once I read through the entire article here on MSDN, it's pretty clear that's the rule, but seem to be an unwritten one.  http://msdn.microsoft.com/en-us/library/ms187928.aspx

Print | posted on Tuesday, March 25, 2014 2:32 PM

Feedback

No comments posted yet.

Your comment:





 

Copyright © Kevin Shyr

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski