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

How to seperate one table to two sames table?

There are no connection and no concatenation between two same tables.

How to do this ?  Please give me some suggestion.

tab1:

LOAD [col1],

[col2],

[col3],

[amount]

FROM [lib://C/New Microsoft Excel Worksheet.xlsx]

(ooxml, embedded labels, table is Sheet1);

tab2:

LOAD [col1],

[col2],

[col3],

[amount]

FROM [lib://C/New Microsoft Excel Worksheet.xlsx]

(ooxml, embedded labels, table is Sheet1);

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe use the QUALIFY *; statement?

View solution in original post

7 Replies
jwjackso
Specialist III
Specialist III

tab1:

LOAD [col1],

[col2],

[col3],

[amount]

FROM [lib://C/New Microsoft Excel Worksheet.xlsx]

(ooxml, embedded labels, table is Sheet1);

NOConcatenate

tab2:

load *

Resident tab1;

swuehl
MVP
MVP

Maybe use the QUALIFY *; statement?

VishalWaghole
Specialist II
Specialist II

tab1:

LOAD [col1],

[col2],

[col3],

[amount]

FROM [lib://C/New Microsoft Excel Worksheet.xlsx]

(ooxml, embedded labels, table is Sheet1);

QUALIFY *;

tab2:

LOAD [col1],

[col2],

[col3],

[amount]

FROM [lib://C/New Microsoft Excel Worksheet.xlsx]

(ooxml, embedded labels, table is Sheet1);

Note : NoConcatenate will create synthetic key.

katharinakostka
Partner - Contributor III
Partner - Contributor III

Hi!

Well as you see, same fields usually create an autoconcatenate. Even if you prevent it via a NOCONCATENATE before the second LOAD statement, you still get -as pointed out by vishal- a synthetic key.

Your question was, how to load it without connecting it, so therefor without synthetic key... as Stefan already mentioned you can archieve this via qualify which will lead to an automated renaming of the fields that keeps the tables separated... Or you could also rename the fields manually. Your choice.

Regards Katharina

Anonymous
Not applicable
Author

Thanks

Anonymous
Not applicable
Author

Thanks

Anonymous
Not applicable
Author

Thank you very much for your answer!