# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

## How I can unite tables in script?

Good Day!

I need help. I have 2 tables, that I load from SQL base (Table 1 and Table 2). I need to get in script Result Table 3. I need to add to Table 1 rows from Table 2 with values in Field A, that not include in Table 1. I prepare sample:

 Table 1 Field A Field B 1 A 2 B 3 C 4 D 5 E Table 2 Field A Field B 4 F 5 G 6 H 7 J 8 K Result Table 3 Field A Field B 1 A 2 B 3 C 4 D 5 E 6 H 7 J 8 K

Thank you.

1 Solution

Accepted Solutions
Honored Contributor II

## Re: How I can unite tables in script?

Hi

Please use the below code.

Thank you.

Table1:

LOAD * INLINE [

Field A,Field B

1,A

2,B

3,C

4,D

5,E

];

Concatenate (Table1)

Table2:

LOAD * INLINE [

Field A,Field B

4,F

5,G

6,H

7,J

8,K

] Where Not Exists([Field A]);

9 Replies
Honored Contributor II

## Re: How I can unite tables in script?

Hi Please use the below script.

This will works.

Table1:

LOAD * INLINE [

Field A,Field B

1,A

2,B

3,C

4,D

5,E

];

Concatenate (Table1)

Table2:

LOAD * INLINE [

Field A,Field B

4,F

5,G

6,H

7,J

8,K

];

Honored Contributor II

MVP

## Re: How I can unite tables in script?

Table1:

LOAD * INLINE [

Field A,Field B

1,A

2,B

3,C

4,D

5,E

];

Concatenate (Table1)

Table2:

LOAD * INLINE [

Field A,Field B

4,F

5,G

6,H

7,J

8,K

] Where Not Exists([Field A]);

Contributor

## Re: How I can unite tables in script?

I think you not only want to Concatenate, but you need a WHERE NOT EXISTS to prevent loading where the field A value is in table 1.

Table1:

LOAD * INLINE [

Field A,Field B

1,A

2,B

3,C

4,D

5,E

];

Concatenate (Table1)

Table2:

LOAD * INLINE [

Field A,Field B

4,F

5,G

6,H

7,J

8,K

]

WHERE NOT EXISTS([Field A]);

Contributor

## Re: How I can unite tables in script?

Your solution does not eliminate the values that already exist in Field A. Check again at the final results expectation. There is only 1 4 and 1 5 in the Field A. Need to include Where Not Exists

Not applicable

## Re: How I can unite tables in script?

I need only one value 4 and 5 from Field A:

Honored Contributor II

## Re: How I can unite tables in script?

Hi

Please use the below code.

Thank you.

Table1:

LOAD * INLINE [

Field A,Field B

1,A

2,B

3,C

4,D

5,E

];

Concatenate (Table1)

Table2:

LOAD * INLINE [

Field A,Field B

4,F

5,G

6,H

7,J

8,K

] Where Not Exists([Field A]);

Not applicable

## Re: How I can unite tables in script?

Thank you all

Honored Contributor II

## Re: How I can unite tables in script?

Please close the thread by selecting Correct Answer. Thank you.