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.




For more details, you can refer to the following: TRY_TO_NUMBER
.


Yogesh Shinde

LinkedInProfile

<<< Back Next >>> 

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Series

Snowflake Vs MS-SQL - Part 79 - Adding a comment to the Column of a Table

Snowflake Vs MS-SQL - Part 75 - String Length and Trimmed Length