Skip to main content
Question

How to identify a numeric value, it contains only numbers in an column ?

  • Oct 26, 2021 10:38 AM UTC
  • 4 replies
  • 211 views

I want to get only numeric values from the column. I'm trying with the syntax '%[^0-9]%' but it is not working.

Numbers

4 replies

  • Oct 26, 2021 12:26 PM UTC

Hi Gundappa,

TO_INT(...) should return NULL for all non-converted values.

 

you could simply use TO_INT(Name) and then filter the component on

FILTER ISNULL(TO_INT(Name)=0)

 

Hope that helps :-)

 

BR,

Lars


  • Oct 26, 2021 4:53 PM UTC

Hi Gundappa,

TO_INT(...) should return NULL for all non-converted values.

 

you could simply use TO_INT(Name) and then filter the component on

FILTER ISNULL(TO_INT(Name)=0)

 

Hope that helps :-)

 

BR,

Lars

Hi Lars,

 

Thank you for the help. I'm able to find the unique numbers within the column but unable to put the filter that give the list of value which has numbers.

I'm trying with below syntax. Please help me on this.

CASE WHEN ( ISNULL ( TO_INT ("TableA_xlsx_TableA"."NAME") = 0 ) THEN 'CLEANSE' ELSE 'PERFECT' END )

 

 


  • Oct 26, 2021 5:31 PM UTC

Hi Gundappa,

two things:

  1. I think the closing bracket in your case when statement is at the wrong place. It should be ISNULL ( TO_INT ("TableA_xlsx_TableA"."NAME")) = 0
  2. I would suggest to use a component filter that says FILTER ISNULL ( TO_INT ("TableA_xlsx_TableA"."NAME")) = 0 ;

 

Hope it helps,

Lars


  • Oct 26, 2021 5:37 PM UTC

Hi Gundappa,

two things:

  1. I think the closing bracket in your case when statement is at the wrong place. It should be ISNULL ( TO_INT ("TableA_xlsx_TableA"."NAME")) = 0
  2. I would suggest to use a component filter that says FILTER ISNULL ( TO_INT ("TableA_xlsx_TableA"."NAME")) = 0 ;

 

Hope it helps,

Lars

It works now. Thank you tons for your help.