[Stackoverflow] [Progress OpenEdge ABL] is it the same to use MATCHES (* + "" + *) and no parameters in a FOR EACH in Progress 4GL?

Status
Not open for further replies.
D

Diego

Guest
So I made the following FOR EACH

Code:
FOR EACH insp_cd
WHERE insp_cd.status_ = 1
AND insp_cd.item MATCHES('*' + pc-itemPost + '*')
AND insp_cd.update_at < NOW:

So, when the pc-itemPost is "", should I avoid using the MATCHES? Like:

Code:
IF pc-itemPost = "" THEN DO:
FOR EACH insp_cd
WHERE insp_cd.status_ = 1
AND insp_cd.update_at < NOW:
...
END.
ELSE DO:
FOR EACH insp_cd
WHERE insp_cd.status_ = 1
AND insp_cd.item MATCHES('*' + pc-itemPost + '*')
AND insp_cd.update_at < NOW:

I know it's very slow because of the table scan, but I'd like to know if there is any difference. Thanks.

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