# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for
Did you mean:
Not applicable

## JOIN on null value

Hi I have a script like below,  how do I get to the expected result? Tried join but didn't work. Thank you!

A:

A, B, C

1, 2

11,22,33

];

join

A, B, C, D

1, 2, 3, 4

];

Result:

 A B C D 1 2 1 2 3 4 11 22 33

Expected:

 A B C D 1 2 3 4 11 22 33
1 Solution

Accepted Solutions

So you want to join a 3 with a null. That's not going to happen. 3 will never be null.

Try joining without C:

Temp:

A, B, C

1, 2

11,22,33

];

join

LOAD A, B, C as X, D INLINE [

A, B, C, D

1, 2, 3, 4

];

Result

LOAD A, B, If(Len(Trim(C))=0,X,C) as C, D

RESIDENT Temp;

DROP TABLE Temp;

talk is cheap, supply exceeds demand
3 Replies

So you want to join a 3 with a null. That's not going to happen. 3 will never be null.

Try joining without C:

Temp:

A, B, C

1, 2

11,22,33

];

join

LOAD A, B, C as X, D INLINE [

A, B, C, D

1, 2, 3, 4

];

Result

LOAD A, B, If(Len(Trim(C))=0,X,C) as C, D

RESIDENT Temp;

DROP TABLE Temp;

talk is cheap, supply exceeds demand
MVP

You can also try this:

A:

B, C as E;

A, B, C

1, 2

11,22,33

];

join

A, B, C, D

1, 2, 3, 4

];

Final:

B,

If(Len(Trim(C)) = 0, E, C) as C,

D

Resident A;

DROP Table A;

Not applicable
Author

Thank you both! Both are correct, too bad the system only allowed me to mark one...