GetMember() function

The GetMember( ) function returns information about a node level, returns integer. The GetMember() function returns specific parts of the node argument. The second argument specifies the level you want returned. A NULL is returned if no corresponding level exists.

Returns: integer or NULL

Syntax

GetMember(node, integer)
node
integer

Example

CREATE TABLE nodetab1 (col1 node);
INSERT INTO nodetab1 VALUES ('1.0');
INSERT INTO nodetab1 VALUES ('1.1.1');
INSERT INTO nodetab1 VALUES ('1.1.2');
INSERT INTO nodetab1 VALUES ('1.1.2.1');
INSERT INTO nodetab1 VALUES ('2.0');

SELECT  col1, GetMember(col1, 3)
FROM    nodetab1;

col1          1.0 
(expression)  

col1          1.1.1 
(expression)  1

col1          1.1.2 
(expression)  2

col1          1.1.2.1 
(expression)  2

col1          2.0 
(expression)