docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  InterSystems MDX Reference

InterSystems MDX Reference
FIRSTCHILD
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Returns the first child of the given member.
Returned Type
This function returns a member.
Syntax and Details
member_expression.FIRSTCHILD 
Where:
The function returns the first child of this member. To determine which child is first, the function considers the default order of the set of children.
Example
For example, consider the following hierarchy:
Now consider the following query:
SELECT MEASURES.[%COUNT] ON 0, homed.zip.[34577].FIRSTCHILD ON 1 FROM patients 

                             Patient Count
Cypress                              1,089
For another example:
SELECT MEASURES.[%COUNT] ON 0, birthd.1960.FIRSTCHILD ON 1 FROM patients
                             Patient Count
Jan-1960                                  5
See Also


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-23 06:47:59