89: pID RAW(200);
90: BEGIN
91: counter := 0;
92: -- Get the reference ID from the def ID
93: select count(*) INTO counter from xdb.xdb$group_ref rg, xdb.xdb$group_def dg where ref(dg) = rg.xmldata.groupref_ref and dg.sys_nc_oid$= groupID;
94: IF (counter <> 0) THEN
95: select rg.sys_nc_oid$ INTO elementID from xdb.xdb$group_ref rg, xdb.xdb$group_def dg where ref(dg) = rg.xmldata.groupref_ref and dg.sys_nc_oid$= groupID;
96: ELSE
97: RETURN NULL;
91: counter := 0;
92: -- Get the reference ID from the def ID
93: select count(*) INTO counter from xdb.xdb$group_ref rg, xdb.xdb$group_def dg where ref(dg) = rg.xmldata.groupref_ref and dg.sys_nc_oid$= groupID;
94: IF (counter <> 0) THEN
95: select rg.sys_nc_oid$ INTO elementID from xdb.xdb$group_ref rg, xdb.xdb$group_def dg where ref(dg) = rg.xmldata.groupref_ref and dg.sys_nc_oid$= groupID;
96: ELSE
97: RETURN NULL;
98: END IF;
99: -- choice