December 2013
Intermediate to advanced
1872 pages
153h 31m
English
The TRY_CONVERT function available in SQL Server 2012 is similar to the TRY_PARSE function in that if the conversion is successful, it returns the value as the specified data type. Otherwise, it returns a NULL value. However, if you request a conversion that is explicitly not permitted, TRY_CONVERT fails with an error.
Like CONVERT, TRY_CONVERT can handle converting to data types other than integer or date and time values.