Skip to content

Commit

Permalink
changed StartsWith to use %scan instead of SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
pbehr-cambro committed Jun 18, 2019
1 parent f09ff6a commit bf322c0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions qrpglesrc/CVTDDS.SQLRPGLE
Original file line number Diff line number Diff line change
Expand Up @@ -583,15 +583,9 @@
inSource varchar(2000) const;
inSearch varchar(2000) const;
end-pi;
dcl-s theyMatch ind;

Exec SQL
SET :theyMatch =
CASE WHEN :inSource LIKE :inSearch CONCAT '%'
THEN '1'
ELSE '0' END;
return (%scan(inSearch : inSource : 1) = 1);

return theyMatch;
end-proc StartsWith;


Expand Down

0 comments on commit bf322c0

Please sign in to comment.