[Stackoverflow] [Progress OpenEdge ABL] What is the easiest way to simulate an SQL "IN" statement

Status
Not open for further replies.
F

Felice

Guest
What is the easiest way to achieve the "IN" SQL functionality in Progress? Here is my code block, and I want to limit this query to 5 different pin numbers for my test. I'd rather not use a string of "OR"s if I can avoid that.

Code:
//using the "IN" way with specific pin numbers
 FOR EACH names NO-LOCK WHERE names.m-date GE 1/1/1900: //AND names.pin IN (179,198,200,201,210)
     FOR EACH nacminfo NO-LOCK WHERE nacminfo.pin = names.pin:
         FIND FIRST nacmtype WHERE nacmtype.contact_type_num EQ nacminfo.contact_type_num 
             AND nacmtype.descr MATCHES ("~*" + "email") NO-LOCK NO-ERROR.
         IF AVAILABLE nacmtype THEN DO:
             DISPLAY
                nacmtype.type_val
                nacmtype.descr.
         END.
     END.
  END.

Continue reading...
 
Status
Not open for further replies.
Top