Simulating TRY_CONVERT() in SQL Server 2008

TRY_CONVERT() is a very handy SQL Server function that can be used to “hide” issues with data – usually a design problem, where a column has been created using the wrong data type, or is overloaded to accept multiple data types. Sometimes you can fix the design, and other times it’s beyond your control. While you can use TRY_CONVERT() to work around a bad data type, you can only do so in SQL Server 2012 or later.