Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
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.