Information Management IBM InfoSphere MDM Custom Domain Hub, Version 10.1

Example: Comparing strings

When you compare an attribute with a string value, the string value must be enclosed with quotation marks. The following example shows the correct way to compare the LastName attribute in a substitution expression.
{id.123.response.TCRMPersonBObj.TCRMPersonNameBObj[where LastName !=
     'Smith'].PersonNameIdPK}
The following example shows an incorrect way to compare the LastName attribute in a substitution expression.
{id.123.response.TCRMPersonBObj.TCRMPersonNameBObj[where LastName !=
     Smith].PersonNameIdPK}

If the word Smith is not enclosed with quotation marks, the expression will throw an exception at runtime time.

Currently, the only comparison operators that are valid for comparing strings are = (equal to) and != (not equal to). The operators <, <=, > and >= are not valid for string comparison. If you use one of these four operators, an exception will be thrown.



Feedback

Timestamp Last updated: November 2012

Topic URL: