Compare with LIKE?

SoloperSoloper Member Posts: 102
Hi experts;

Is it possible to compare two text value with LIKE? (in c/al)


Something like the code below :

If tableA.FieldA Like *ABCD* Then
..
..

This doesnt work.

Any suggeestion?

Answers

  • matteo_montanarimatteo_montanari Member Posts: 189
    Soloper wrote:
    Hi experts;

    Is it possible to compare two text value with LIKE? (in c/al)


    Something like the code below :

    If tableA.FieldA Like *ABCD* Then
    ..
    ..

    This doesnt work.

    Any suggeestion?

    Hi

    You can use "STRPOS" function

    IF STRPOS(tableA.FieldA, 'ABCD') <> 0 THEN
    ...

    Bye

    Matteo
    Reno Sistemi Navision Developer
  • SoloperSoloper Member Posts: 102
    Works fine.

    Grazie Matteo.
Sign In or Register to comment.