Snowflake Vs MS-SQL - Part 71 - Data Is Numeric Or NOT
Data Is Numeric Or NOT
While applying your business logic, you need to check whether the data present in a particular column is Numeric or Text. Based on this, your logic will vary.
COL2 IS_NUMERIC
1 true
2 true
3.0 true
A false
B false
MS-SQL Server
We can achieve this by using the function ISNUMERIC as below:
In Snowflake, we can use a similar approach; we can use TRY_TO_NUMBER as below.
Yogesh Shinde
Comments
Post a Comment