Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
random_user_3869
Partner - Creator III
Partner - Creator III

concatenate not working

Hello everyone, 

I'm doing the following concatenante:

 

FAIT:
Load DISTINCT
if(len(TEXT([IDENTIFIANT CLIENT DTM])) >0,TEXT([IDENTIFIANT CLIENT DTM])) AS [IDENTIFIANT CLIENT DTM],
[IDENTIFIANT CLIENT DTM] as [IDENTIFIANT CLIENT DTM ORIGINE],
[%LK_DATAMART_CLI],
[IDENTIFIANT TYPOLOGIE MARCHE]

Resident '$(vs_QVD_Prefixe_Niv2)_FAIT_CLIENT'
WHERE [IDENTIFIANT CLIENT DTM] = 'ORION-1227554';
Drop Table '$(vs_QVD_Prefixe_Niv2)_FAIT_CLIENT';

 

Concatenate(FAIT)
Load DISTINCT
if(len(TEXT([IDENTIFIANT CLIENT DTM])) >0,TEXT([IDENTIFIANT CLIENT DTM])) AS [IDENTIFIANT CLIENT DTM],
[IDENTIFIANT CLIENT DTM] AS [IDENTIFIANT CLIENT DTM LIGNE COMMANDE],
[%LK_DATAMART_CLI_ENTT_LIGN_CDE],
[IDENTIFIANT COMMANDE]
Resident '$(vs_QVD_Prefixe_Niv2)_FAIT_LIGNE_COMMANDE'
WHERE [IDENTIFIANT CLIENT DTM] = 'ORION-1227554';
Drop Table '$(vs_QVD_Prefixe_Niv2)_FAIT_LIGNE_COMMANDE';

But as a resut i get this :

 

lessassy_3869_0-1650272826747.png

 

Which i dion't understand.

Please can someone help met.

Thank you

Labels (1)
4 Replies
vchuprina
Specialist
Specialist

Hi,

Qlik doesn't work as SQL, for qlik is important to have similar column names in tables.

You just need to change names in the second table.

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
vchuprina
Specialist
Specialist

Concatenate in Qlikview isn't equal to Union in SQL.

There are two main differences:

1. SQL combines columns based on their order. You just need to have the same data type.

Qlik combines columns based on their names, data type doesn't matter.

2.  Union in SQL removes duplicates

Concatenate operation in Qlik doesn't remove duplicates, from this point of view it's  similar to UNION  ALL

Also, please note that Qlik automatically concatenates tables when they have a similar structure, even without CONCATENATE key word

Regards,

Vitalii

 

 

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
random_user_3869
Partner - Creator III
Partner - Creator III
Author

hello,

 

i'm nott sure you understand: basicalle what i want to do is:

fact:

load 

field a,

field b

resident table x;

concatenate (fact)

load

field a,

field e

resident table y;

 

and basically when i do concatenate the key field (field a) do not match even if they are suppose to match (text format and same value)

vchuprina
Specialist
Specialist

Concatenate works as expected, I guess you need to use  outer join instead concatenate 

Concatenate:

vchuprina_0-1650275263131.png

Outer join:

Outer join(table1)

vchuprina_1-1650275325884.png

Regards,

Vitalii

 

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").