Vai al contenuto principale

Concatenate

IN QUESTA PAGINA

APPRENDIMENTO CORRELATO

Concatenate

Se due tabelle da concatenare contengono gruppi differenti di campi, è tuttavia possibile imporre la concatenazione di due tabelle utilizzando il prefisso 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;