Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Break down versions into an integer – SQL

I’m trying to break down versions into integers.

for example,
from 14.4 to 14
or from 9.4.1 to 9

How can I define the number until the dot?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks.

>Solution :

you can try SPLIT_PART
https://docs.snowflake.com/en/sql-reference/functions/split_part.html

select Split_part(column1,'.',0) col1 from values ('14.4') ,('9.4.1') , ('12345.5656')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading