Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Concatenate two Excel-files result in two tables (if I use Qualify*)

Basiclly I want to Concatenate two Excelfiles that has transactions for two different years. But Concatenate results in two different tables instead of one.

I've figured out that it is due to the fact that I Qualify all fields but the date-field. If I dont Qualify all fields the Excel-files Concatenate as intended...but I end up with other un-intended effects i.e. fields loose tablename "table.field", I also get un-intended keys to other tables...) 

QUALIFY *;

UNQUALIFY datum_YearMonth;

personal:
LOAD

left(Period,4) & '-' & mid(Period,5,2) as datum_YearMonth
,Antal

,Apris

,Belopp

FROM
$(ExcelRelativeOriginalFolder)Personal\Personal.xlsx
(ooxml, embedded labels, table is Sheet1);

CONCATENATE (personal) LOAD

left(Period,4) & '-' & mid(Period,5,2) as datum_YearMonth
,Antal

,Apris

,Belopp

FROM
$(ExcelRelativeOriginalFolder)Personal\Personal.xlsx
(ooxml, embedded labels, table is Sheet1);

2 Replies
Anonymous
Not applicable
Author

Guess that I can use an unqualified temp_table, load the two excel-files into it, then load the result into a qualified perminent table...

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Did you actually get two seperate tables? (Open the table viewer to be sure) . Or one table with field names qualified by the input file name?

-Rob