
Contributor II
2019-04-23
09:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Combine 3 tables into 1 by Concatenate
Hi,
I am tried concatenate 3 tables into 1 table. The script as below. The output was I only able to get the 1st table content, which the Category is XX.
Final:
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);
Left Join
LOAD
A,
D,
E,
F,
'XX' as Categoty
FROM qvd;
concatenate(Final)
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);
Left Join
LOAD
A,
D,
E,
F,
'YY' as Categoty
FROM qvd;
concatenate(Final)
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);
Left Join
LOAD
A,
D,
E,
F,
'ZZ' as Categoty
FROM qvd;
Thanks
Steve
3,672 Views
1 Solution
Accepted Solutions

MVP
2019-04-23
10:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My bad, try this
Final:
NoConcatenate LOAD * Resident Final_Temp1; Concatenate (Final) LOAD * Resident Final_Temp2; Concatenate (Final) LOAD * Resident Final_Temp3; DROP Tables Final_Temp1, Final_Temp2, Final_Temp3;
4 Replies

MVP
2019-04-23
09:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
Final_Temp1: LOAD A, B, C FROM [lib://AttachedFiles/XXX.xlsx] (ooxml, embedded labels, table is [Sheet1]); Left Join (Final_Temp1) LOAD A, D, E, F, 'XX' as Category FROM qvd; Final_Temp2: LOAD A, B, C FROM [lib://AttachedFiles/XXX.xlsx] (ooxml, embedded labels, table is [Sheet1]); Left Join (Final_Temp2) LOAD A, D, E, F, 'YY' as Category FROM qvd; Final_Temp3: LOAD A, B, C FROM [lib://AttachedFiles/XXX.xlsx] (ooxml, embedded labels, table is [Sheet1]); Left Join (Final_Temp3) LOAD A, D, E, F, 'ZZ' as Categoty FROM qvd; Final: LOAD * Resident Final_Temp1; Concatenate (Final) LOAD * Resident Final_Temp2; Concatenate (Final) LOAD * Resident Final_Temp3; DROP Tables Final_Temp1, Final_Temp2, Final_Temp3;
3,668 Views

Contributor II
2019-04-23
10:07 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get the error message Table 'Final' not found on
Concatenate (Final)
3,662 Views

MVP
2019-04-23
10:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My bad, try this
Final:
NoConcatenate LOAD * Resident Final_Temp1; Concatenate (Final) LOAD * Resident Final_Temp2; Concatenate (Final) LOAD * Resident Final_Temp3; DROP Tables Final_Temp1, Final_Temp2, Final_Temp3;

Contributor II
2019-04-23
09:43 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Sunny
3,638 Views
