3 Replies Latest reply: May 15, 2014 9:52 AM by Grant Perkins RSS

    Template Help

    ndello _

      Hi all, long time, but I have to come back.

      I have a report where I am building a template and have come across the following data:




      I built my trap to look for the + sign.  I then only want the rate that follows and I want it to stop when it gets to the Q.

      How Can I do this, because my trap is 5 places after the +, thus, I get some Q's in the data.


      BTW, Monarch Pro 8.01

        • Template Help
          Grant Perkins

          Hi again,


          If you have V8 (I can't recall whether you do ro don't) and there is nothing following the string you need to get rid of (is it always QUAR?) then you might consider trapping on the +, painting the field for the max number of characters that might appear in the numeric part of the string area you need to get and making that the intial field.


          In the table create a calculated field that uses the STRIP function to remove the relevant, or all, alpha characters form the string. Maybe a flavour of TRIM if required for onwards processing.


          Alternatively and similar if the extra characters are always "QUAR", extract the field to be quite wide, abd then use the STUFF function to replace QUAR with nothing.


          OR  ... take the field and RTRIM it, use LEN to find the length and then, if the string to be removed is always QUAR, LEFT(field,LEN(trimmed_FIELD)-4). There are a number of ways of writing that particular formula, this is just an outline of the approach rather than a cut and paste!


          Strip or Stuff would be my preference if they are available to you.






          • Template Help
            ndello _

            Good Morning Grant, and thank you.


            The Strip is perfect.


            Have a nice holiday season.

            • Template Help
              Grant Perkins

              Originally posted by ndello:

              Have a nice holiday season. /b[/quote]You too.


              Ours is a month away yet but, for most people, when it arrives it will last into 2007 !