Skip to main content

Check if value is number

  • October 22, 2015
  • 4 replies
  • 16 views

VC_
Forum|alt.badge.img+1
  • Participating Frequently

Hi All,

 

Is there any way to check value is number or text without installing anyother addin or user define function.

 

Many Thanks!.

4 replies

Adrian_Oprea_1
Forum|alt.badge.img+1
  • Participating Frequently
  • October 22, 2015

 Is this at load time (for the copy command). Or is for data that is already in the db(maybe not !)?


VC_
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • October 22, 2015
In both cases..

1) at the of data load - skip row if value is non numeric
2) data available in table - In select statement maybe in where clause

Adrian_Oprea_1
Forum|alt.badge.img+1
  • Participating Frequently
  • October 22, 2015

 

 

1) at the of data load - skip row if value is non numeric

 - i guess you need ot do it before you put data in.

 Use an ETL tool, or do it by hand in Bash 


2) data available in table - In select statement maybe in where clause

Use the projeciton_columns to identify the data type :

Ex:

 

select table_name,column_name,data_type from columns;

What do you want to achive by doing this ? maybe there is a better way 

 

 

 


VC_
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • October 22, 2015
Basically I want to put a join in between two tables but the problem is the data type is not same in both tables Colums (which i want to use for join), one table column is integer and another table column is varchar or string format.

Please suggest!.

Thank!..