Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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
Partner - Champion II
Partner - Champion II

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.