1 Reply Latest reply: May 15, 2014 9:57 AM by Grant Perkins RSS

    New User Question on Concatenation

    ADuncan _

      I just started using Monarch.. I have a model set up that traps 4 columns that have a blank space in between them.  Can I create a trap that will eliminate the space in between the columns so that all 4 columns are in one field and there is no space?




      1234 1234 1234 1234

      Needs to show as 1234123412341234


      Thanks in advance for any help!  [img]smile.gif[/img] 


        • New User Question on Concatenation
          Grant Perkins

          Hi April,


          There may be a few ways to approach this - depends on which version of Monarch you have to play with.


          If you have V7 you could consider creating a single field across all 4 columns (there may be other reasons why this is not appropriate for you but it is a feasible solution to the problem described      ) and then create a calculated field to make a new version of the original field without the spaces using the STRIP function.


          Alternatively keep the 4 field separate and concatenate them using a calculated field and a function something like:




          If the fields are not of consistent size you may need to consider removing any spaces 'captured' using one of the TRIM, LTRIM or RTRIM function variants.


          The key is that all fields must be in the same record. If you are using V7 Columnar processing it is likely that each field will be in a separate record in which case this suggestion is not appropriate. But then it woould also suggest that columnar processing is not the way to go for thye requirement.


          I hope this helps you to move in the right direction.




          Edit to say that I am not trying to steal Todd's ideas! Just a case of concurrent posting! I must be too slow.


          [size="1"][ March 22, 2005, 02:17 PM: Message edited by: Grant Perkins ][/size]