Home > Enterprise >  Varchar to Number in Snowflake
Varchar to Number in Snowflake

Time:02-02

I am trying to convert data type for a column from Varchar to Number but I was not successful.

tried below functions: try_to_number cast (col as number(38,0))

enter image description here

CodePudding user response:

maybe because of commas , try this :

select try_to_number(replace(sentcount,','))
  •  Tags:  
  • Related