DBA Data[Home] [Help]

APPS.GMDQC_RESULTS dependencies on DUAL

Line 37: select nvl(p_cust_id,0) into v_cust_id from dual;

33: begin
34: if p_cust_id is not NULL OR
35: p_vendor_id is not NULL then
36: /* Customer/Vender Specification */
37: select nvl(p_cust_id,0) into v_cust_id from dual;
38: select nvl(p_vendor_id,0) into v_vendor_id from dual;
39: /* Local Customer/Vender */
40: SELECT count(*) into v_count
41: FROM qc_spec_mst

Line 38: select nvl(p_vendor_id,0) into v_vendor_id from dual;

34: if p_cust_id is not NULL OR
35: p_vendor_id is not NULL then
36: /* Customer/Vender Specification */
37: select nvl(p_cust_id,0) into v_cust_id from dual;
38: select nvl(p_vendor_id,0) into v_vendor_id from dual;
39: /* Local Customer/Vender */
40: SELECT count(*) into v_count
41: FROM qc_spec_mst
42: WHERE item_id = p_item_id

Line 53: ' AND NVL(vendor_id,0) = '||v_vendor_id into v_temp_string from dual;

49: if v_count > 0 then
50: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id||
51: ' AND ' ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0
52: AND orgn_code ='||''''||p_orgn_code||''''||' AND NVL(cust_id,0) = '||v_cust_id||
53: ' AND NVL(vendor_id,0) = '||v_vendor_id into v_temp_string from dual;
54: return v_temp_string;
55: end if;
56:
57: /* Global Customer/Vender */

Line 71: ' AND NVL(vendor_id,0) = '||v_vendor_id into v_temp_string from dual;

67: if v_count > 0 then
68: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id||
69: ' AND ' || ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0
70: AND orgn_code is NULL AND NVL(cust_id,0) = '||v_cust_id||
71: ' AND NVL(vendor_id,0) = '||v_vendor_id into v_temp_string from dual;
72: return v_temp_string;
73: end if;
74: elsif
75: P_BATCH_ID is not NULL OR

Line 82: select nvl(p_batch_id,0) into v_batch_id from dual;

78: P_OPRN_ID is not NULL OR
79: P_routingstep_id is not NULL then
80: /* Production Specification */
81:
82: select nvl(p_batch_id,0) into v_batch_id from dual;
83: select nvl(p_formula_id,0) into v_formula_id from dual;
84: select nvl(p_routing_id,0) into v_routing_id from dual;
85: select nvl(p_oprn_id,0) into v_oprn_id from dual;
86: select nvl(p_routingstep_id,0) into v_routingstep_id from dual;

Line 83: select nvl(p_formula_id,0) into v_formula_id from dual;

79: P_routingstep_id is not NULL then
80: /* Production Specification */
81:
82: select nvl(p_batch_id,0) into v_batch_id from dual;
83: select nvl(p_formula_id,0) into v_formula_id from dual;
84: select nvl(p_routing_id,0) into v_routing_id from dual;
85: select nvl(p_oprn_id,0) into v_oprn_id from dual;
86: select nvl(p_routingstep_id,0) into v_routingstep_id from dual;
87:

Line 84: select nvl(p_routing_id,0) into v_routing_id from dual;

80: /* Production Specification */
81:
82: select nvl(p_batch_id,0) into v_batch_id from dual;
83: select nvl(p_formula_id,0) into v_formula_id from dual;
84: select nvl(p_routing_id,0) into v_routing_id from dual;
85: select nvl(p_oprn_id,0) into v_oprn_id from dual;
86: select nvl(p_routingstep_id,0) into v_routingstep_id from dual;
87:
88: /* ORG + Batch + Formula + Routing + Operation */

Line 85: select nvl(p_oprn_id,0) into v_oprn_id from dual;

81:
82: select nvl(p_batch_id,0) into v_batch_id from dual;
83: select nvl(p_formula_id,0) into v_formula_id from dual;
84: select nvl(p_routing_id,0) into v_routing_id from dual;
85: select nvl(p_oprn_id,0) into v_oprn_id from dual;
86: select nvl(p_routingstep_id,0) into v_routingstep_id from dual;
87:
88: /* ORG + Batch + Formula + Routing + Operation */
89: SELECT count(*) into v_count

Line 86: select nvl(p_routingstep_id,0) into v_routingstep_id from dual;

82: select nvl(p_batch_id,0) into v_batch_id from dual;
83: select nvl(p_formula_id,0) into v_formula_id from dual;
84: select nvl(p_routing_id,0) into v_routing_id from dual;
85: select nvl(p_oprn_id,0) into v_oprn_id from dual;
86: select nvl(p_routingstep_id,0) into v_routingstep_id from dual;
87:
88: /* ORG + Batch + Formula + Routing + Operation */
89: SELECT count(*) into v_count
90: FROM qc_spec_mst

Line 109: into v_temp_string from dual;

105: ' AND NVL(formula_id,0) = '||v_formula_id||
106: ' AND NVL(routing_id,0) = '||v_routing_id||
107: ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
108: ' AND NVL(oprn_id,0) = '||v_oprn_id
109: into v_temp_string from dual;
110: return v_temp_string;
111: end if;
112:
113: /* Batch + Formula + Routing + Operation */

Line 144: into v_temp_string from dual;

140: ' AND NVL(formula_id,0) = '||v_formula_id||
141: ' AND NVL(routing_id,0) = '||v_routing_id||
142: ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
143: ' AND NVL(oprn_id,0) = '||v_oprn_id
144: into v_temp_string from dual;
145: return v_temp_string;
146: end if;
147:
148: /* Orgn + Batch + Formula + Routing */

Line 172: into v_temp_string from dual;

168: orgn_code ='||''''||p_orgn_code||''''||
169: ' AND NVL(batch_id,0) = '||v_batch_id||
170: ' AND NVL(formula_id,0) = '||v_formula_id||
171: ' AND NVL(routing_id,0) = '||v_routing_id
172: into v_temp_string from dual;
173: return v_temp_string;
174: end if;
175:
176:

Line 202: into v_temp_string from dual;

198: AND orgn_code is NULL'||
199: ' AND NVL(batch_id,0) = '||v_batch_id||
200: ' AND NVL(formula_id,0) = '||v_formula_id||
201: ' AND NVL(routing_id,0) = '||v_routing_id
202: into v_temp_string from dual;
203: return v_temp_string;
204: end if;
205:
206: /* Orgn + Batch + Formula*/

Line 227: into v_temp_string from dual;

223: ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
224: orgn_code ='||''''||p_orgn_code||''''||
225: ' AND NVL(batch_id,0) = '||v_batch_id||
226: ' AND NVL(formula_id,0) = '||v_formula_id
227: into v_temp_string from dual;
228: return v_temp_string;
229: end if;
230:
231: /* Batch + Formula */

Line 252: into v_temp_string from dual;

248: ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
249: orgn_code is NULL'||
250: ' AND NVL(batch_id,0) = '||v_batch_id||
251: ' AND NVL(formula_id,0) = '||v_formula_id
252: into v_temp_string from dual;
253: return v_temp_string;
254: end if;
255:
256:

Line 285: into v_temp_string from dual;

281: ' AND NVL(formula_id,0) = '||v_formula_id||
282: ' AND NVL(routing_id,0) = '||v_routing_id||
283: ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
284: ' AND NVL(oprn_id,0) = '||v_oprn_id
285: into v_temp_string from dual;
286: return v_temp_string;
287: end if;
288:
289: /* Formula + Routing + Operation*/

Line 317: into v_temp_string from dual;

313: ' AND NVL(formula_id,0) = '||v_formula_id||
314: ' AND NVL(routing_id,0) = '||v_routing_id||
315: ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
316: ' AND NVL(oprn_id,0) = '||v_oprn_id
317: into v_temp_string from dual;
318: return v_temp_string;
319: end if;
320:
321: /* Orgn + Formula + Routing */

Line 342: into v_temp_string from dual;

338: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code ='||
339: ''''||p_orgn_code||''''||
340: ' AND NVL(formula_id,0) = '||v_formula_id||
341: ' AND NVL(routing_id,0) = '||v_routing_id
342: into v_temp_string from dual;
343: return v_temp_string;
344: end if;
345:
346: /* Formula + Routing */

Line 367: into v_temp_string from dual;

363: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
364: p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code is NULL'||
365: ' AND NVL(formula_id,0) = '||v_formula_id||
366: ' AND NVL(routing_id,0) = '||v_routing_id
367: into v_temp_string from dual;
368: return v_temp_string;
369: end if;
370:
371: /* SKARIMIS Added this condition due to bug raised by Joan on vis database bug no 1347027 date 07/18/2000 */

Line 390: into v_temp_string from dual;

386: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
387: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code ='||
388: ''''||p_orgn_code||''''||
389: ' AND NVL(formula_id,0) = '||v_formula_id
390: into v_temp_string from dual;
391: return v_temp_string;
392: end if;
393: /* End of New Code addition */
394:

Line 435: into v_temp_string from dual;

431: ''''||p_orgn_code||''''||
432: ' AND NVL(routing_id,0) = '|| v_routing_id||
433: ' AND NVL(routingstep_id,0) = '|| v_routingstep_id||
434: ' AND NVL(oprn_id,0) = '|| v_oprn_id
435: into v_temp_string from dual;
436: return v_temp_string;
437: end if;
438:
439: if v_count > 0 and v_count < v_count1 then

Line 446: into v_temp_string from dual;

442: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code ='||
443: ''''||p_orgn_code||''''||
444: ' AND NVL(formula_id,0) = '||v_formula_id||
445: ' AND NVL(oprn_id,0) = '||v_oprn_id
446: into v_temp_string from dual;
447: return v_temp_string;
448: end if;
449:
450: /* Formula + Operation OR Routing + Routing step */

Line 488: into v_temp_string from dual;

484: orgn_code is NULL'||
485: ' AND NVL(routing_id,0) = '|| v_routing_id||
486: ' AND NVL(routingstep_id,0) = '|| v_routingstep_id||
487: ' AND NVL(oprn_id,0) = '|| v_oprn_id
488: into v_temp_string from dual;
489: return v_temp_string;
490: end if;
491:
492: if v_count > 0 and v_count < v_count1 then

Line 499: into v_temp_string from dual;

495: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
496: orgn_code is NULL '||
497: ' AND NVL(formula_id,0) = '||v_formula_id||
498: ' AND NVL(oprn_id,0) = '||v_oprn_id
499: into v_temp_string from dual;
500: return v_temp_string;
501: end if;
502:
503: /* Formula OR Routing */

Line 533: into v_temp_string from dual;

529: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
530: p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
531: orgn_code is NULL'||
532: ' AND formula_id = '||v_formula_id
533: into v_temp_string from dual;
534: return v_temp_string;
535: end if;
536:
537: if (v_count > 0 and v_count1 > 0 and v_count1 < v_count) or

Line 543: into v_temp_string from dual;

539:
540: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
541: p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code is NULL'||
542: ' AND routing_id = '||v_routing_id
543: into v_temp_string from dual;
544: return v_temp_string;
545: end if;
546:
547: /* Operation */

Line 563: into v_temp_string from dual;

559: if v_count > 0 then
560: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
561: p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code is NULL'||
562: ' AND oprn_id = '||v_oprn_id
563: into v_temp_string from dual;
564: return v_temp_string;
565: end if;
566: else
567: /* Item Specification */

Line 571: select nvl(p_lot_id,0) into v_lot_id from dual;

567: /* Item Specification */
568:
569: v_add_string:=' AND (FORMULA_ID IS NULL AND ROUTING_ID IS NULL AND OPRN_ID IS NULL AND CUST_ID IS NULL AND VENDOR_ID IS NULL)';
570:
571: select nvl(p_lot_id,0) into v_lot_id from dual;
572:
573: /* Orgn + Lot/Sublot + Warehouse + Location */
574: v_count := 0;
575:

Line 602: into v_temp_string from dual;

598: p_orgn_code||''''||
599: ' AND NVL(lot_id,0) = '||v_lot_id||
600: ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
601: ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
602: into v_temp_string from dual;
603: return v_temp_string||v_add_string;
604: end if;
605:
606: /* Lot/Sublot + Warehouse + Location */

Line 635: into v_temp_string from dual;

631: p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code is NULL'||
632: ' AND NVL(lot_id,0) = '||v_lot_id||
633: ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
634: ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
635: into v_temp_string from dual;
636: return v_temp_string||v_add_string;
637: end if;
638:
639: /* Orgn + Lot/Sublot + Warehouse */

Line 667: into v_temp_string from dual;

663: ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
664: orgn_code ='||''''||p_orgn_code||''''||
665: ' AND NVL(lot_id,0) = '||v_lot_id||
666: ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'
667: into v_temp_string from dual;
668: return v_temp_string||v_add_string;
669: end if;
670:
671: /* Lot/Sublot + Warehouse */

Line 698: into v_temp_string from dual;

694: ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
695: orgn_code is NULL'||
696: ' AND NVL(lot_id,0) = '||v_lot_id||
697: ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'
698: into v_temp_string from dual;
699: return v_temp_string||v_add_string;
700: end if;
701:
702: /* Orgn + Lot/Sublot */

Line 726: into v_temp_string from dual;

722: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
723: ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
724: orgn_code ='||''''||p_orgn_code||''''||
725: ' AND lot_id = '||v_lot_id
726: into v_temp_string from dual;
727: return v_temp_string||v_add_string;
728: end if;
729:
730: /* Lot/Sublot */

Line 754: into v_temp_string from dual;

750: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
751: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
752: orgn_code is NULL'||
753: ' AND lot_id = '||v_lot_id
754: into v_temp_string from dual;
755: return v_temp_string||v_add_string;
756: end if;
757:
758: /* Orgn Warehouse + Location */

Line 785: into v_temp_string from dual;

781: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
782: orgn_code ='||''''||p_orgn_code||''''||
783: ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
784: ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
785: into v_temp_string from dual;
786: return v_temp_string||v_add_string;
787: end if;
788:
789: /* Warehouse + Location */

Line 815: into v_temp_string from dual;

811: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
812: p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code is NULL'||
813: ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
814: ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
815: into v_temp_string from dual;
816: return v_temp_string||v_add_string;
817: end if;
818:
819: /* Orgn Warehouse */

Line 842: into v_temp_string from dual;

838: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''
839: ||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code ='||
840: ''''||p_orgn_code||''''||
841: ' AND whse_code = '||''''||p_whse_code||''''
842: into v_temp_string from dual;
843: return v_temp_string||v_add_string;
844: end if;
845:
846: /* Warehouse */

Line 870: into v_temp_string from dual;

866: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
867: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
868: orgn_code is NULL'||
869: ' AND whse_code = '||''''||p_whse_code||''''
870: into v_temp_string from dual;
871: return v_temp_string||v_add_string;
872: end if;
873: end if;
874: /* ORGN + ITEM */

Line 893: into v_temp_string from dual;

889: if v_count > 0 then
890: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
891: ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
892: orgn_code ='||''''||p_orgn_code||''''
893: into v_temp_string from dual;
894: return v_temp_string||v_add_string;
895: end if;
896: /* ITEM */
897: v_count := 0;

Line 915: into v_temp_string from dual;

911: if v_count > 0 then
912: select 'SELECT qc_spec_id, assay_code FROM qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
913: ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
914: orgn_code is NULL'
915: into v_temp_string from dual;
916: return v_temp_string||v_add_string;
917: end if;
918: return '';
919: end qc_find_spec;