OCLOperators sqlLike
(Updated Edited template to July 12, 2025.)
No edit summary
 
Line 2: Line 2:
In SQL databases, you have the Like operator. In OCL, we added this same functionality as SqlLike.
In SQL databases, you have the Like operator. In OCL, we added this same functionality as SqlLike.


SqlLike works both in OCL and in [[OCL-PS]].
SqlLike works both in OCL and in [[Documentation:OCL-PS|OCL-PS]].


SqlLike enables you to match part of strings like this:
SqlLike enables you to match part of strings like this:
Line 8: Line 8:
Add a <code>%</code> to say that "could be anything here."
Add a <code>%</code> to say that "could be anything here."


See also: [[OCLOperators sqlLikeCaseInsensitive|sqlLikeCaseInsensitive]]
See also: [[Documentation:OCLOperators sqlLikeCaseInsensitive|sqlLikeCaseInsensitive]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]
{{Edited|July|12|2025}}
{{Edited|July|12|2025}}

Latest revision as of 04:57, 4 February 2025

This page was created by Hans.karlsen@mdriven.net on 2018-07-22. Last edited by Stephanie@mdriven.net on 2025-02-04.

In SQL databases, you have the Like operator. In OCL, we added this same functionality as SqlLike.

SqlLike works both in OCL and in OCL-PS.

SqlLike enables you to match part of strings like this:

Person.allinstances->select(a|a.Identity.sqlLike('%'+vSeekParam+'%'))->orderby(identity)

Add a % to say that "could be anything here."

See also: sqlLikeCaseInsensitive