[MS SQL] Use new TRY_PARSE() instead of ISNUMERIC()

2020. 1. 27. 11:36Development

SELECT
TRY_PARSE('123' as int) as '123'
,TRY_PARSE('123.0' as float) as '123.0'
,TRY_PARSE('123.1' as decimal(4,1)) as '123.1'
,TRY_PARSE('$123.55' as money) as '$123.55'
,TRY_PARSE('2013/09/20' as datetime) as '2013/09/20'

 

 

참조 : https://blogs.msdn.microsoft.com/manub22/2013/12/23/use-new-try_parse-instead-of-isnumeric-sql-server-2012/

 

Use new TRY_PARSE() instead of ISNUMERIC()

Use new TRY_PARSE() instead of ISNUMERIC() | SQL Server 2012 12/23/2013 2 minutes to read In this article --> I was working on a legacy T-SQL script written initially on SQL Server 2005 and I was facing an unexpected behavior. The code was giving me unexpe

docs.microsoft.com