Snowflake Vs MS-SQL - Part 20 - Separate out Number from String

 


Separate out Number from String 

Suppose you have an alphanumeric string(Yogesh2000) and if you want to separate out numbers. In this case, Yogesh & 2000 should get separated.


MS-SQL Server 

You can use inbuilt SQL Functions Patindex & Substring.




In Snowflakewe can achieve this by using Regular Expression REGEXP_SUBSTR.




For more details, you can refer to the following LINK.




 

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