기본 콘텐츠로 건너뛰기

Concatenate

관련 학습 자료

Concatenate

서로 다른 필드 집합을 가진 두 테이블을 연결하는 경우 Concatenate 접두사를 사용하여 두 테이블의 연결을 강제로 적용할 수 있습니다. This statement forces concatenation with an existing named table or the latest previously created logical table.

Syntax:  

Concatenate[ (tablename ) ] ( loadstatement | selectstatement )

 

A concatenation is in principle the same as the SQL UNION statement, but with two differences:

  • The Concatenate prefix can be used no matter if the tables have identical field names or not.
  • Identical records are not removed with the Concatenate prefix.

Arguments:  

Argument Description
tablename The name of the existing table.

Example:  

Concatenate LOAD * From file2.csv;

Concatenate SELECT * From table3;

tab1:

LOAD * From file1.csv;

tab2:

LOAD * From file2.csv;

.. .. ..

Concatenate (tab1) LOAD * From file3.csv;