Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following tables:
Entry No_ | Item No_ | Quantity | Entry Type | Document No_ |
3248633 | 224964 | -100 | 5 | RC-32538 |
Table2:
Entry No_ | Item No_ | Quantity | Entry Type | Document No_ |
32486300 | 1 | -9 | 5 | RC-32538 |
32486319 | 2 | -9 | 5 | RC-32538 |
19 | 6 | -9 | 5 | RC-32539 |
38 | 7 | -9 | 5 | RC-32539 |
I want to concatenate Table 2 with Table 1.
but where document No.s are not the same.
Since RC-32538 already appeared in the first table, only the ;last two records should be concatenated with the first table.
The result table should be as follows:
Entry No_ | Item No_ | Quantity | Entry Type | Document No_ |
3248633 | 224964 | -100 | 5 | RC-32538 |
19 | 6 | -9 | 5 | RC-32539 |
38 | 7 | -9 | 5 | RC-32539 |
Can anyone help me with a possible solution.
Hi,
LOAD *
from 1;
concatenate
load *
from 2 where not exits(Document No_);
Look attached file
Regards
Vimlesh
But it compares fields in the second table also.
For eg. i want both the lines for the document no. RC-32539 to be concatenated.
only RC-32538 should not be concatenated.
but it is adding only first line.
Second line is ignored.
Hi
What criterion are you using to decide what should be concatenated?
Jonathan
Table1:
Load * Inline [
Entry No_,Item No_,Quantity,Entry Type,Document No_
3248633,224964,-100,5,RC-32538 ];
Table2:
Load [Entry No_],[Item No_],Quantity,[Entry Type],[Document No1_] As [Document No_];
Load * Inline [
Entry No_,Item No_,Quantity,Entry Type,Document No1_
32486300,1,-9,5,RC-32538
32486319,2,-9,5,RC-32538
19,6,-9,5,RC-32539
38,7,-9,5,RC-32539 ]
Where
Not Exists([Document No_],[Document No1_]);
This will remove duplicates based on "Document No_" from second table.
load *
from 2 where not exits(Document No_);
Not getting desired results.
check the following.
RC:
LOAD [Entry No_],
[Item No_],
Quantity,
[Entry Type],
[Document No_]
FROM
RC.xlsx
(ooxml, embedded labels, table is Sheet1);
RC1:
LOAD [Entry No_],
[Item No_],
Quantity,
[Entry Type],
[Document No_] as Doc
FROM
RC.xlsx
(ooxml, embedded labels, table is Sheet2)
where not exists ([Document No_]),(Doc);
Hi,
Modify your script like below
RC:
LOAD [Entry No_],
[Item No_],
Quantity,
[Entry Type],
[Document No_]
FROM
RC.xlsx
(ooxml, embedded labels, table is Sheet1);
Concatenate
LOAD [Entry No_],
[Item No_],
Quantity,
[Entry Type],
[Document No_] as Doc
FROM
RC.xlsx
(ooxml, embedded labels, table is Sheet2)
where not exists ([Document No_],[Document No_]);
Regards
Inline table is working for me. Can you post RC.xlsx file
have atatched