DBA Data[Home] [Help]

APPS.GMDQC_RESULTS SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 37

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

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

         SELECT count(*) into v_count
         FROM   qc_spec_mst
         WHERE  item_id = p_item_id
         AND    p_sample_date BETWEEN from_date AND to_date
         AND    delete_mark = 0
         AND    orgn_code = p_orgn_code
         AND    NVL(cust_id,0) = v_cust_id
         AND    NVL(vendor_id,0) = v_vendor_id ;
Line: 50

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id||
                     ' AND ' ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0
                     AND    orgn_code ='||''''||p_orgn_code||''''||' AND NVL(cust_id,0) = '||v_cust_id||
                    ' AND    NVL(vendor_id,0) = '||v_vendor_id into v_temp_string from dual;
Line: 58

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code is NULL
            AND    NVL(cust_id,0) = v_cust_id
            AND    NVL(vendor_id,0) = v_vendor_id;
Line: 68

                 select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id||
                        ' AND ' || ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0
                        AND orgn_code is NULL  AND  NVL(cust_id,0) = '||v_cust_id||
                        ' AND    NVL(vendor_id,0) = '||v_vendor_id into v_temp_string from dual;
Line: 82

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

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

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

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

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

         SELECT count(*) into v_count
         FROM   qc_spec_mst
         WHERE  item_id = p_item_id
         AND    p_sample_date BETWEEN from_date AND to_date
         AND    delete_mark = 0
         AND    orgn_code = p_orgn_code
         AND    NVL(batch_id,0) = v_batch_id
         AND    NVL(formula_id,0) = v_formula_id
         AND    NVL(routing_id,0) = v_routing_id
         AND    NVL(routingstep_id,0) = v_routingstep_id
         AND    NVL(oprn_id,0) = v_oprn_id;
Line: 101

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND
                      delete_mark = 0 AND    orgn_code ='||''''||p_orgn_code||''''||
                      ' AND NVL(batch_id,0) = '||v_batch_id||
            	    ' AND NVL(formula_id,0) = '||v_formula_id||
           		    ' AND NVL(routing_id,0) = '||v_routing_id||
                      ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
                      ' AND NVL(oprn_id,0) = '||v_oprn_id
             into v_temp_string from dual;
Line: 122

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(batch_id,0) = v_batch_id
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id
           AND    NVL(routingstep_id,0) = v_routingstep_id
           AND    NVL(oprn_id,0) = v_oprn_id;
Line: 136

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                     ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                     orgn_code is NULL'||
             ' AND NVL(batch_id,0) = '||v_batch_id||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id||
             ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
             ' AND NVL(oprn_id,0) = '||v_oprn_id
             into v_temp_string from dual;
Line: 155

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(batch_id,0) = v_batch_id
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id;
Line: 166

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                     ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                     orgn_code ='||''''||p_orgn_code||''''||
             ' AND NVL(batch_id,0) = '||v_batch_id||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id
             into v_temp_string from dual;
Line: 184

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(batch_id,0) = v_batch_id
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id;
Line: 196

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                     ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0
                          AND    orgn_code is NULL'||
             ' AND NVL(batch_id,0) = '||v_batch_id||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id
             into v_temp_string from dual;
Line: 212

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(batch_id,0) = v_batch_id
           AND    NVL(formula_id,0) = v_formula_id;
Line: 222

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
                      ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code ='||''''||p_orgn_code||''''||
             ' AND NVL(batch_id,0) = '||v_batch_id||
             ' AND NVL(formula_id,0) = '||v_formula_id
             into v_temp_string from dual;
Line: 237

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(batch_id,0) = v_batch_id
           AND    NVL(formula_id,0) = v_formula_id;
Line: 247

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
                      ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                       orgn_code is NULL'||
             ' AND NVL(batch_id,0) = '||v_batch_id||
             ' AND NVL(formula_id,0) = '||v_formula_id
             into v_temp_string from dual;
Line: 265

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id
           AND    NVL(routingstep_id,0) = v_routingstep_id
           AND    NVL(oprn_id,0) = v_oprn_id;
Line: 278

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code ='||
                        ''''||p_orgn_code||''''||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id||
             ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
             ' AND NVL(oprn_id,0) = '||v_oprn_id
             into v_temp_string from dual;
Line: 297

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id
           AND    NVL(routingstep_id,0) = v_routingstep_id
           AND    NVL(oprn_id,0) = v_oprn_id;
Line: 310

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code is NULL'||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id||
             ' AND NVL(routingstep_id,0) = '||v_routingstep_id||
             ' AND NVL(oprn_id,0) = '||v_oprn_id
             into v_temp_string from dual;
Line: 327

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id;
Line: 337

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code ='||
                      ''''||p_orgn_code||''''||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id
             into v_temp_string from dual;
Line: 352

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(routing_id,0) = v_routing_id;
Line: 363

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                      p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code is NULL'||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(routing_id,0) = '||v_routing_id
             into v_temp_string from dual;
Line: 377

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(formula_id,0) = v_formula_id;
Line: 386

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code ='||
                      ''''||p_orgn_code||''''||
             ' AND NVL(formula_id,0) = '||v_formula_id
             into v_temp_string from dual;
Line: 402

           SELECT min(preference) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(formula_id,0) = v_formula_id
           AND    NVL(oprn_id,0) = v_oprn_id;
Line: 416

           SELECT min(preference) into v_count1
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(routing_id,0) = v_routing_id
           AND    NVL(routingstep_id,0) = v_routingstep_id
           AND    NVL(oprn_id,0) = v_oprn_id;
Line: 429

             select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                     p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code ='||
                     ''''||p_orgn_code||''''||
             ' AND NVL(routing_id,0) = '|| v_routing_id||
             ' AND NVL(routingstep_id,0) = '|| v_routingstep_id||
             ' AND NVL(oprn_id,0) = '|| v_oprn_id
             into v_temp_string from dual;
Line: 441

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code ='||
                      ''''||p_orgn_code||''''||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(oprn_id,0) = '||v_oprn_id
             into v_temp_string from dual;
Line: 456

            SELECT min(preference) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code is NULL
            AND    NVL(formula_id,0) = v_formula_id
            AND    NVL(oprn_id,0) = v_oprn_id;
Line: 469

           SELECT min(preference) into v_count1
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(routing_id,0) = v_routing_id
           AND    NVL(routingstep_id,0) = v_routingstep_id
           AND    NVL(oprn_id,0) = v_oprn_id;
Line: 482

             select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                             ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                             orgn_code is NULL'||
             ' AND NVL(routing_id,0) = '|| v_routing_id||
             ' AND NVL(routingstep_id,0) = '|| v_routingstep_id||
             ' AND NVL(oprn_id,0) = '|| v_oprn_id
             into v_temp_string from dual;
Line: 494

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code is NULL '||
             ' AND NVL(formula_id,0) = '||v_formula_id||
             ' AND NVL(oprn_id,0) = '||v_oprn_id
             into v_temp_string from dual;
Line: 507

           SELECT min(preference) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    formula_id = v_formula_id;
Line: 517

           SELECT min(preference) into v_count1
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    routing_id = v_routing_id;
Line: 529

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                      p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code is NULL'||
             ' AND formula_id = '||v_formula_id
             into v_temp_string from dual;
Line: 540

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                      p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code is NULL'||
                      ' AND routing_id = '||v_routing_id
             into v_temp_string from dual;
Line: 550

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    oprn_id = v_oprn_id;
Line: 560

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                     p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code is NULL'||
             ' AND oprn_id = '||v_oprn_id
             into v_temp_string from dual;
Line: 571

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

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(lot_id,0) = v_lot_id
           AND    NVL(whse_code,0) = NVL(p_whse_code,0)
           AND    NVL(location,0) = NVL(p_location,0)
           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;
Line: 596

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                      p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND orgn_code ='||''''||
                      p_orgn_code||''''||
             ' AND NVL(lot_id,0) = '||v_lot_id||
             ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
             ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
             into v_temp_string from dual;
Line: 613

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code is NULL
           AND    NVL(lot_id,0) = v_lot_id
           AND    NVL(whse_code,0) = NVL(p_whse_code,0)
           AND    NVL(location,0) = NVL(location,0)
           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;
Line: 630

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                      p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code is NULL'||
             ' AND NVL(lot_id,0) = '||v_lot_id||
             ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
             ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
             into v_temp_string from dual;
Line: 645

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code = p_orgn_code
            AND    NVL(lot_id,0) = v_lot_id
            AND    NVL(whse_code,0) = NVL(p_whse_code,0)
            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;
Line: 662

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
                       ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                        orgn_code ='||''''||p_orgn_code||''''||
             ' AND NVL(lot_id,0) = '||v_lot_id||
             ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'
             into v_temp_string from dual;
Line: 677

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code is NULL
            AND    NVL(lot_id,0) = v_lot_id
            AND    NVL(whse_code,0) = NVL(p_whse_code,0)
            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;
Line: 693

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
                      ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code is NULL'||
             ' AND NVL(lot_id,0) = '||v_lot_id||
             ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'
             into v_temp_string from dual;
Line: 707

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code = p_orgn_code
            AND    lot_id = v_lot_id
            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;
Line: 722

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
                      ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code ='||''''||p_orgn_code||''''||
             ' AND lot_id = '||v_lot_id
             into v_temp_string from dual;
Line: 735

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code is NULL
            AND    lot_id = v_lot_id
            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;
Line: 750

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                         orgn_code is NULL'||
             ' AND lot_id = '||v_lot_id
             into v_temp_string from dual;
Line: 764

           SELECT count(*) into v_count
           FROM   qc_spec_mst
           WHERE  item_id = p_item_id
           AND    p_sample_date BETWEEN from_date AND to_date
           AND    delete_mark = 0
           AND    orgn_code = p_orgn_code
           AND    NVL(whse_code,0) = NVL(p_whse_code,0)
           AND    NVL(location,0) = NVL(location,0)
           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;
Line: 780

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                             ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                            orgn_code ='||''''||p_orgn_code||''''||
             ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
             ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
             into v_temp_string from dual;
Line: 795

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code is NULL
            AND    NVL(whse_code,0) = NVL(p_whse_code,0)
            AND    NVL(location,0) = NVL(location,0)
            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;
Line: 811

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''||
                      p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code is NULL'||
             ' AND NVL(whse_code,0) = NVL('||''''||p_whse_code||''''||',0)'||
             ' AND NVL(location,0) = NVL('||''''||p_location||''''||',0)'
             into v_temp_string from dual;
Line: 824

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code = p_orgn_code
            AND    whse_code = p_whse_code
            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;
Line: 838

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||''''
                      ||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND    orgn_code ='||
                      ''''||p_orgn_code||''''||
             ' AND whse_code = '||''''||p_whse_code||''''
             into v_temp_string from dual;
Line: 851

            SELECT count(*) into v_count
            FROM   qc_spec_mst
            WHERE  item_id = p_item_id
            AND    p_sample_date BETWEEN from_date AND to_date
            AND    delete_mark = 0
            AND    orgn_code is NULL
            AND    whse_code = p_whse_code
            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;
Line: 866

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                            orgn_code is NULL'||
             ' AND whse_code = '||''''||p_whse_code||''''
             into v_temp_string from dual;
Line: 876

         SELECT count(*) into v_count
         FROM   qc_spec_mst
         WHERE  item_id = p_item_id
         AND    p_sample_date BETWEEN from_date AND to_date
         AND    delete_mark = 0
         AND    orgn_code = p_orgn_code
         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;
Line: 890

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND '
                          ||''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                          orgn_code ='||''''||p_orgn_code||''''
             into v_temp_string from dual;
Line: 898

         SELECT count(*) into v_count
         FROM   qc_spec_mst
         WHERE  item_id = p_item_id
         AND    p_sample_date BETWEEN from_date AND to_date
         AND    delete_mark = 0
         AND    orgn_code is NULL
         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;
Line: 912

              select 'SELECT qc_spec_id, assay_code FROM   qc_spec_mst WHERE item_id = ' ||p_item_id|| ' AND ' ||
                      ''''||p_sample_date||''''|| ' BETWEEN from_date AND to_date AND delete_mark = 0 AND
                      orgn_code is NULL'
             into v_temp_string from dual;