InterSystems IRIS Data Platform 2019.2  /  InterSystems MDX Reference

InterSystems MDX Reference
Logical Expressions
Previous section           Next section
InterSystems: The power behind what matters   

This section describes how to create and use logical expressions in InterSystems MDX.
Details and Uses
MDX does not include a logical data type. However, it provides the FILTER function and the IIF function, both of which take an argument that is treated as true or false. In these contexts, InterSystems MDX interprets numeric and string values as true or false, as follows:
In the same contexts, you can combine true and false values by using the following standard tools:
When you compare scalar values of different types, the system compares them as follows:
If Then
Both expressions are numeric Perform a numeric comparison
Both expressions are strings Perform a string comparison
One expression is numeric and the other is a string The numeric expression is less than the string expression
You cannot use member expressions in a logical comparison expression. For example, the following is not a valid logical expression:
Instead, you should use the Name property or some other suitable property, all of which are strings. For example, the following is a valid logical expression:
homed.CURRENTMEMBER.Properties("Name") = "magnolia"
See the reference section “Intrinsic Properties” for intrinsic properties that you can use.
Also see the section “Measure Search Expressions.”

Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-20 05:45:45