Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
arethaking
Creator II
Creator II

Why we use concatinate function in qlikview?

Hi All ,

Please help

1 Solution

Accepted Solutions
qlikviewwizard
Master II
Master II

If two tables that are to be concatenated have different sets of fields, concatenation of two tables can still be forced with the Concatenate prefix. This statement forces concatenation with an existing named table or the latest previously created logical table. An automatic concatenation occurs if two tables have the same field names.

Concatenate

Now let's look at Concatenate. Concatenate appends the rows of one table to another. Concatenate never merges any rows. The number of rows in a concatenated table is always the sum of the rows from the two input tables. Here's what our sample data will look like after Concatenate.

CONCATENATE (Table1) LOAD * RESIDENT Table2;

KeyAC
1A1
1C1
2A2
2C2
3A3
4C4

Rows with like Key values are not merged together. The rows from Table2 are simply appended to Table1. Because the tables have different fields, rows will have null values for the fields from the "other" table.

View solution in original post

6 Replies
sibin_jacob
Creator III
Creator III

Concatenate function is for appending two tables.

If it is having same column name and same column count, it will concatenate automatically.

If you want to append two tables, which is having different column names,

you need to use concatenate function in between two tables load statement.

It is for forcefully concatenate two tables.

Please refer the below link for more details.

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes...

sarvesh
Creator III
Creator III

Hi Aretha,

If two tables that are to be concatenated have different sets of fields, concatenation of two tables can still be forced with the Concatenate prefix. This statement forces concatenation with an existing named table or the latest previously created logical table. An automatic concatenation occurs if two tables have the same field names.

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.

If your problem has been shortout, please mark correct and helpful and close this thread.

Regard's

Sarvesh Srivastava

MarcoWedel

please close your open threads

thanks

regards

Marco

balabhaskarqlik

What's your expectation on Concatenate?

Refer these:

Concatenate appends the rows of one table to another. The number of rows in a concatenated table is always the sum of the rows from the two input tables. Here's what our sample data will look like after Concatenate. It happens even when the tables have different number of columns. It differs from both Join and Keep command, as it does not merge the matching rows from two tables into one row.

https://www.tutorialspoint.com/qlikview/qlikview_concatenation.htm

https://community.qlik.com/thread/39177

qlikviewwizard
Master II
Master II

If two tables that are to be concatenated have different sets of fields, concatenation of two tables can still be forced with the Concatenate prefix. This statement forces concatenation with an existing named table or the latest previously created logical table. An automatic concatenation occurs if two tables have the same field names.

Concatenate

Now let's look at Concatenate. Concatenate appends the rows of one table to another. Concatenate never merges any rows. The number of rows in a concatenated table is always the sum of the rows from the two input tables. Here's what our sample data will look like after Concatenate.

CONCATENATE (Table1) LOAD * RESIDENT Table2;

KeyAC
1A1
1C1
2A2
2C2
3A3
4C4

Rows with like Key values are not merged together. The rows from Table2 are simply appended to Table1. Because the tables have different fields, rows will have null values for the fields from the "other" table.

balabhaskarqlik

If you got the answer, please close the thread.