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 - Part 36 - SPLIT_TO_TABLE

Snowflake Vs MS-SQL - Part 63 - ON Clause & Cross Join

Snowflake Vs MS-SQL - Part 33 - INITCAP