cancel
Showing results for 
Search instead for 
Did you mean: 

column datatype in IDT

Former Member
0 Kudos

Hi,

In IDT, we have join on two columns whose data type showing Varchar and Integer respectively in data foundation. we have option in dfx to edit the data type.
My question is, what will happen in above example if i change above column data type varchar to Integer ? Will it treat as Integer column when running the query??

If so, I have created one calculated column using formula like convert(Object, Intger), then what is the difference between this calculated Integer column and above Integer column(data type changed from Varchar->Integer)

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

No the Object with the Varchar datatype will be considered as Varchar and not integer since you are only applying the convert function only on a Join and not the actual column. You SQL would come out as below

Object1 Varchar from Table x

Object 2 Integer from Table y

Select Object1,

           Object 2

From x,y

Where Convert(x.Object1,Integer) = y.Object2

Hope this helps

Former Member
0 Kudos

Hi Tauseef,

Yes, I agree with above SQL when we join with calculated column. But what will happen when you edit the actual column data type to Integer? and in which scenario we will edit datatype in data foundation level?

I will give one more example.. We have one Key fig which don't have any values and it is showing its datatype as varchar in datafoundation. So I changed that KF datatype to Integer, changed in business layer as well to Numeric. (Its SQL definition is sum(table.KF)). When we execute the query it is displaying error message that sum function can only be applied to Integer. So it is taking actual data type (Varchar) and ignoring that changed data type (Integer) in data foundation level.

Thanks,