Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Append records with different field names

Hi Experts,

I want to append records into one table from two different tables, but on my two tables the number of fields and field order arrangement  is same for both. But here field names are different

Note : I cannot change the field names on Table2

Illustration

Table1

FieldName1FieldName2FieldName3
aaa1aaa2aaa3
bbb1bbb2bbb3

Table2 (with different names - but table structure is same as Table1)

@1@2@3
ccc1ccc2ccc3
ddd1ddd2ddd3

Result

FieldName1FieldName2FieldName3
aaa1aaa2aaa3
bbb1bbb2bbb3
ccc1ccc2ccc3
ddd1ddd2

ddd3

1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

Result:

Load

'Table1' AS Source,

FieldName1,

FieldName2,

FieldName3

from

Table1;

Concatenate

Load

'Table2' AS Source,

@1 as FieldName1,

@2 as FieldName2,

@3 as FieldName3

from

Table2;

Should do it.  Identifying the source in a separate column will help to refer back to your source files and for testing purposes.

Regards

Andy

View solution in original post

3 Replies
ogster1974
Partner - Master II
Partner - Master II

Result:

Load

'Table1' AS Source,

FieldName1,

FieldName2,

FieldName3

from

Table1;

Concatenate

Load

'Table2' AS Source,

@1 as FieldName1,

@2 as FieldName2,

@3 as FieldName3

from

Table2;

Should do it.  Identifying the source in a separate column will help to refer back to your source files and for testing purposes.

Regards

Andy

reddy-s
Master II
Master II

Hi Debabrata,

As Andy mentioned concatenate should solve your issue.

Not applicable
Author

Thanks a lot Andy.