238: as legislation_code
239: from dual;
240:
241: l_query_str VARCHAR2(20000);
242: queryCtx DBMS_XMLQuery.ctxType;
243: xmlString1 CLOB ;
244: l_entityset VARCHAR2(100) ;
245: l_entity VARCHAR2(100) ;
246: l_legislation_code VARCHAR2(10);
1256: END IF;
1257: hr_utility.trace(l_entityset || '.........2');
1258: --hr_utility.trace('Query is ' || l_query_str);
1259:
1260: queryCtx := DBMS_XMLQuery.newContext(l_query_str);
1261: DBMS_XMLQuery.setMaxRows(queryCtx,l_sample_size);
1262: DBMS_XMLQuery.setRowsetTag(queryctx,l_entityset);
1263:
1264: hr_utility.trace(l_entityset || '.........3');
1257: hr_utility.trace(l_entityset || '.........2');
1258: --hr_utility.trace('Query is ' || l_query_str);
1259:
1260: queryCtx := DBMS_XMLQuery.newContext(l_query_str);
1261: DBMS_XMLQuery.setMaxRows(queryCtx,l_sample_size);
1262: DBMS_XMLQuery.setRowsetTag(queryctx,l_entityset);
1263:
1264: hr_utility.trace(l_entityset || '.........3');
1265: DBMS_XMLQuery.setRowTag(queryctx,l_entityset);
1258: --hr_utility.trace('Query is ' || l_query_str);
1259:
1260: queryCtx := DBMS_XMLQuery.newContext(l_query_str);
1261: DBMS_XMLQuery.setMaxRows(queryCtx,l_sample_size);
1262: DBMS_XMLQuery.setRowsetTag(queryctx,l_entityset);
1263:
1264: hr_utility.trace(l_entityset || '.........3');
1265: DBMS_XMLQuery.setRowTag(queryctx,l_entityset);
1266:
1261: DBMS_XMLQuery.setMaxRows(queryCtx,l_sample_size);
1262: DBMS_XMLQuery.setRowsetTag(queryctx,l_entityset);
1263:
1264: hr_utility.trace(l_entityset || '.........3');
1265: DBMS_XMLQuery.setRowTag(queryctx,l_entityset);
1266:
1267: DBMS_XMLQuery.setBindValue(queryCtx,'business_group_id',p_business_group_id);
1268:
1269: p_xmldata := DBMS_XMLQuery.getXML(queryCtx);
1263:
1264: hr_utility.trace(l_entityset || '.........3');
1265: DBMS_XMLQuery.setRowTag(queryctx,l_entityset);
1266:
1267: DBMS_XMLQuery.setBindValue(queryCtx,'business_group_id',p_business_group_id);
1268:
1269: p_xmldata := DBMS_XMLQuery.getXML(queryCtx);
1270: hr_utility.trace(l_entityset || '.........4');
1271:
1265: DBMS_XMLQuery.setRowTag(queryctx,l_entityset);
1266:
1267: DBMS_XMLQuery.setBindValue(queryCtx,'business_group_id',p_business_group_id);
1268:
1269: p_xmldata := DBMS_XMLQuery.getXML(queryCtx);
1270: hr_utility.trace(l_entityset || '.........4');
1271:
1272: IF (instr(p_xmldata,(l_entityset || '/')) <>0 ) THEN
1273: p_xmldata := null;