Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jerryr125
Creator III
Creator III

Concatenating / Appending two tables in the Data Load Editor

Hi - I have the following in my data load editor (example) :

 

[TABLEA]:
LOAD
Field01,

Field02,

Field03
FROM File1234;

 

[TABLEB]:
LOAD
Field01,

Field02,

Field03
FROM File5678;

 

Field01, Field02 and Field03 are exactly the same format in both tables (so no issues there).

 

What if I want to add the rows from TABLEB to TABLEA, is there a way to concatenate/append the two tables in the Data Load Editor ?

 

If so, how ? 

 

- Jerry

2 Solutions

Accepted Solutions
Gui_Approbato
Creator III
Creator III

Hey Jerry,

 

In this case you just have to add the "concatenate" function between both tables. It will "add" table B below table A. If you have the same records in both tables they will be duplicated. If you don't want to duplicate records, check out the 'join' functions (left join, right join,..).

[TABLEA]:
LOAD
Field01,

Field02,

Field03
FROM File1234;

concatenate

[TABLEB]:
LOAD
Field01,

Field02,

Field03
FROM File5678;

 

Cheers,

View solution in original post

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

As others indicated, you can add the Concatenate prefix to the TableB load to force the rows to be appended to TableA.  An important note, if you run your script as you posted, without "Concatenate", you will see no TABLEB in your data model.  When the fieldlist in a  LOAD statement (TABLEB) is the same as an existing table (TABLEA), automatic concatenation will occur.  You will find all your rows in TABLEA and there will be no TABLEB.

-Rob

View solution in original post

3 Replies
Gui_Approbato
Creator III
Creator III

Hey Jerry,

 

In this case you just have to add the "concatenate" function between both tables. It will "add" table B below table A. If you have the same records in both tables they will be duplicated. If you don't want to duplicate records, check out the 'join' functions (left join, right join,..).

[TABLEA]:
LOAD
Field01,

Field02,

Field03
FROM File1234;

concatenate

[TABLEB]:
LOAD
Field01,

Field02,

Field03
FROM File5678;

 

Cheers,

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

As others indicated, you can add the Concatenate prefix to the TableB load to force the rows to be appended to TableA.  An important note, if you run your script as you posted, without "Concatenate", you will see no TABLEB in your data model.  When the fieldlist in a  LOAD statement (TABLEB) is the same as an existing table (TABLEA), automatic concatenation will occur.  You will find all your rows in TABLEA and there will be no TABLEB.

-Rob

jerryr125
Creator III
Creator III
Author

thank you - works perfect !