Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

Join two fields with different data types

Hi guys,

if i have 2 tables linked by a field A but those fields haven't the same data type, field A in table 1 is varchar and the other is a number. it affects the join or not?

Thanks

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

It does affect the join, yes. Just convert one of the fields to match the other when reading them in. If you want them to be text, then do this when loading the table where it's a number:

text(A) as A

Or if you want them to be numbers, do this when loading the table where it's text:

num(A) as A

View solution in original post

4 Replies
vikramv
Creator III
Creator III

They would just be force concatenated.Take a look ate the below example.

A:

LOAD * INLINE [

    A, B

    1, 4

    2, 5

    3, 6

];

B:

LOAD * INLINE [

    A, D

    a, 1

    b, 2

    c, 3

];

Output:

When we create a table box using Table A and B :

   

ABD
a- 1
b- 2
c- 3
14-
25 -
36 -
sunny_talwar

Can you share the kind of data you have?

johnw
Champion III
Champion III

It does affect the join, yes. Just convert one of the fields to match the other when reading them in. If you want them to be text, then do this when loading the table where it's a number:

text(A) as A

Or if you want them to be numbers, do this when loading the table where it's text:

num(A) as A

master_student
Creator III
Creator III
Author

Thanks John.