Page 1 of 1

how to change datatype in the joining field in the IA

Posted: Mon Jan 20, 2014 6:14 am
by Gaurav1
Hi ,

I am getting error in while saving the data rule definition, the problem is on joining, the key columns of two tables are different, so while joining in IA, throwing error on joining,

just another way i want solution in IA of below query.

select * from xxx A inner join yyy B
ON CAST( A.ZON_CODE as DECIMAL)) = B.ZON_CODE


please provide solution , waiting for reply.

Posted: Mon Jan 20, 2014 6:49 am
by stuartjvnorton
What have you tried?
Or are you just waiting?

Posted: Mon Jan 20, 2014 7:15 am
by Gaurav1
I am not able to find the solution at IA, so just waiting for solution.

Thansk!

Posted: Mon Jan 20, 2014 9:46 am
by rjdickson
Hi,

Have you looked at the TOSTRING or VAL functions?

Posted: Tue Jan 21, 2014 12:23 am
by Gaurav1
Hi,

In the data rule , join key tab (selecting as a key field in the join) there is no option to modify datatype of the field.

The doubt is, how to change data type in the joining condition, as we can do to db2 like CAST( A.ZON_CODE as DECIMAL)) = B.ZON_CODE

Thanks//

Posted: Tue Jan 21, 2014 1:58 am
by ray.wurlod
Create a virtual column on the table, and use that in your join.

Posted: Tue Jan 21, 2014 3:43 am
by Gaurav1
Thanks ray

:)