Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'd like to link two tables together by Part Number. The Part Number can both in a number(1234) or text(002H32) format. How should I specify only a Text match, which means for example I don't want to loose "0"s in front of my text? Thanks!
Try use text([Part Number])
Try use text([Part Number])
QlikView shouldn't drop any leading zeros: it loads what it is given. As long as you ensure that any leading zeros are preserved in the source data, it should be ok. If you load this simple example, you'll see that the 'key' links the 2 tables even though it has different formats.
load * inline [
key, data
001x, 12
abcd, 14
1122, 10
];
load * inline [
key
001x
abcd,
1122
];
Azam
Azam,
Your example works because it is incomplete. Try this, see that 12 and 0012 are the same for QV (001x is text because of "x"):
t1:
load * inline [
key, data
001x, 12
0012, 40
abcd, 14
1122, 10
];
t2:
load * inline [
key, test
001x, a
0012, b
12, c
abcd, d
1122, e
];
This works correctly:
t1:
load text(key), data inline [
key, data
001x, 12
0012, 40
abcd, 14
1122, 10
];
t2:
load text(key), test inline [
key, test
001x, a
0012, b
12, c
abcd, d
1122, e
];
Regards,
Michael
Ah...thanks for pointing that out.
Azam
Hi Michael,
thank you for your input! I would modify your answer a little bit to text([Part Number]) as [Part Number].