[Home] [Help]
416: l_ret_value VARCHAR2(1);
417: l_datatype NUMBER;
418:
419: CURSOR c IS SELECT qpc.char_id,qpc.operator,qpc.low_value,qpc.high_value,qc.datatype
420: FROM qa_pc_criteria qpc ,qa_chars qc
421: WHERE qpc.plan_relationship_id = p_plan_relationship_id
422: AND qpc.char_id = qc.char_id;
423: BEGIN
424:
705:
706: -- Bug 4958734. SQL Repository Fix SQL ID: 15007931
707: CURSOR child_seq_char_ids(c_child_plan_id NUMBER) IS
708: SELECT qc.char_id
709: FROM qa_plan_chars qpc, qa_chars qc
710: WHERE qpc.plan_id = c_child_plan_id
711: AND qpc.char_id = qc.char_id
712: AND qpc.enabled_flag = 1
713: AND qc.datatype = 5
720: AND child_enabled_flag = 1;
721: /*
722: SELECT qc.char_id
723: FROM qa_plan_chars qpc,
724: qa_chars qc
725: WHERE qpc.plan_id = c_child_plan_id
726: AND qpc.char_id = qc.char_id
727: AND qpc.enabled_flag = 1
728: AND qc.datatype = 5
2070: -- Bug 8546279.Changed cursor query to inclide date type elements too
2071: -- collecting datatype too for datatype 3,date and 6,datetime.pdube
2072: Cursor cur (p_plan_id in NUMBER, p_res_col in VARCHAR2) is
2073: Select 1, qc.hardcoded_column, qc.datatype
2074: from qa_plan_chars qpc, qa_chars qc
2075: where qpc.plan_id = p_plan_id
2076: and qpc.char_id = qc.char_id
2077: and qpc.result_column_name = p_res_col
2078: and qc.datatype in (3,6);
2077: and qpc.result_column_name = p_res_col
2078: and qc.datatype in (3,6);
2079:
2080: data_found PLS_INTEGER := 0;
2081: hardcoded_column QA_CHARS.HARDCODED_COLUMN%TYPE := NULL;
2082: -- Bug 8546279 FP of 8446050.Added variables.pdube
2083: datatype NUMBER;
2084: child_is_datetime BOOLEAN := FALSE;
2085: datetimetype CONSTANT NUMBER := 6;
2223: FUNCTION IS_SPECIAL_HC_ELEM ( p_child_result_column VARCHAR2,
2224: p_child_plan_id NUMBER) return BOOLEAN AS
2225: CURSOR p_cur IS
2226: SELECT 1
2227: FROM qa_chars qc,
2228: qa_plan_chars qpc
2229: WHERE qc.char_id = qpc.char_id
2230: AND qpc.plan_id = p_child_plan_id
2231: AND qpc.result_column_name = p_child_result_column
2262: -- of a Hardcoded element and also to fetch its
2263: -- dereferenced column.
2264: Cursor cur (p_plan_id in NUMBER, p_res_col in VARCHAR2) is
2265: Select UPPER(TRANSLATE(qc.name, ' ''*{}', '_____')) name, qc.hardcoded_column
2266: from qa_plan_chars qpc, qa_chars qc
2267: where qpc.plan_id = p_plan_id
2268: and qpc.char_id = qc.char_id
2269: and qpc.result_column_name = p_res_col;
2270:
2268: and qpc.char_id = qc.char_id
2269: and qpc.result_column_name = p_res_col;
2270:
2271: parent_element_name varchar2(2000):= NULL;
2272: hardcoded_column QA_CHARS.HARDCODED_COLUMN%TYPE := NULL;
2273:
2274: BEGIN
2275: -- init the select column to null.
2276: x_select_column := NULL;
2685:
2686: CURSOR seq_cursor is
2687: SELECT qpc.char_id,
2688: qpc.result_column_name
2689: FROM qa_chars qc,
2690: qa_plan_chars qpc
2691: WHERE qpc.plan_id = p_child_plan_id
2692: AND qpc.char_id NOT IN
2693: (SELECT child_char_id
4895: FROM qa_pc_plan_relationship qppr,
4896: qa_pc_criteria qpc,
4897: qa_results qr,
4898: qa_plan_chars qapc,
4899: qa_chars qc
4900: WHERE qpc.plan_relationship_id = qppr.plan_relationship_id
4901: AND qapc.char_id = qpc.char_id
4902: AND qapc.char_id = qc.char_id
4903: AND qr.occurrence = p_occurrence