2 Replies Latest reply: Apr 26, 2017 9:55 AM by Bill Markham RSS

    Concatenating Fields

    Mark Ritter

      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?

        • Re: Concatenating Fields
          omar bensalem

          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.

            • Re: Concatenating Fields
              Bill Markham

              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.