Re: Another Report INSTR Question

From: DanHW <danhw_at_aol.com>
Date: 01 Sep 2000 02:08:24 GMT
Message-ID: <20000831220824.25792.00000781_at_ng-fk1.aol.com>


>Is there a way to concatenate a list of letters to search for in the
>INSTR built-in: LIKE
>
>INSTR('String to search','P',|G',|X',|S',|T',',1) where if any of the
>group shows up in string to search it will return a pos number. I can
>do this with a INSTR search for each incidence, however, I would like to
>put them all in one line, can this be done?
>
>The problem is the user can enter a list of JONs and if the first
>postiton of the JON is either of the above letters it is an indirect and
>can stand alone where any other starting letter has to be related to a
>CON. If any of the JONs are indirect the JON layout will be called
>without a relationship. If none of the indirect JONs are found the JON
>layout will be called with the CON relationship.
>
>Thanks,
>Diane
>perkinsdt_at_yahoo.com

Building on Aleksandr response, you could use the Translate command to create a string that translates just the target letters to something else and compare that to the original. If the translated string and the original are the same, the target letters did not occur.

translate (teststring,

    'ABCDEFGHIJKLMNOPQRSTUVWXYZ,
    'ABCDEF1HIJKLMNO1QR11UVW1YZ) [put the rest of the number and lc letters and symbols in also]

then, as a decode statement

where teststring=[translate statement]

Hope this helps

Dan Hekimian-Williams Received on Fri Sep 01 2000 - 04:08:24 CEST

Original text of this message