Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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]);
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
];
Hi pmaxx0108
Please select Correct Answer instead of Helpful and close the thread. 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]);
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]);
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
I need only one value 4 and 5 from Field A:
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]);
Thank you all
Hi pmaxx0108
Please close the thread by selecting Correct Answer. Thank you.