Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

Concatenating Fields

Is there a preferred symbol to use to separate fields being concatenated?

I have seen both the '-' and the '|' used.  Is this just a personal preference or are there any hidden advantages to one over the other?

2 Replies
OmarBenSalem

I don't think there is a difference; we only do include one of those 2 to seperate 2 fields to have a distinct Field.

For example:

Field1,Field2,Field1&Field2, Field1&'-'Field2

10      ,100   ,10100           , 10-100

101    ,00     ,10100          , 101-00

So when when using '-' or '|', It's just to make sure we have the right concatenation.

Anonymous
Not applicable

I prefer the pipe as in '|'.

If you use the minus sign as in '-' then if you are not careful and you are separating numeric values then it may act as a numerical operator and subtract one number from the other leaving you just the resulting single number.