DBA Data[Home] [Help]

APPS.GMD_EXPRESSION_UTIL SQL Statements

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

Line: 26

      SELECT max(level)
          FROM   gmd_parsed_expression p
          WHERE  expression_type <> -1
          START WITH p.tech_parm_id = V_tech_parm_id
          CONNECT BY PRIOR expression_parm_id = p.tech_parm_id
          AND (p.data_type <> 11 OR p.tech_parm_id <> p.expression_parm_id);
Line: 33

      /*SELECT max(level)
      FROM   gmd_parsed_expression p, gmd_tech_parameters_b b
      WHERE  expression_type <> -1
      AND    p.tech_parm_id = b.tech_parm_id (+)
      START WITH p.tech_parm_id = V_tech_parm_id
      CONNECT BY PRIOR expression_parm_id = p.tech_parm_id
      AND (b.data_type <> 11 or p.tech_parm_id <> expression_parm_id);*/
Line: 58

    /* Delete any parsed expression which was existing already */
    DELETE FROM gmd_parsed_expression
    WHERE tech_parm_id = p_tech_parm_id;
Line: 69

          /*If their is a preceding string then insert it as either an operator or operand */
          insert_expression_key (P_orgn_id		=> P_orgn_id,
                                 P_tech_parm_id 	=> P_tech_parm_id,
                                 P_key 			=> L_str,
                                 X_return_status 	=> L_return_status);
Line: 95

      insert_expression_key (P_orgn_id		=> P_orgn_id,
                             P_tech_parm_id	=> P_tech_parm_id,
                             P_key 		=> L_str,
                             X_return_status 	=> L_return_status);
Line: 104

    /* Now let us update all the existing parsed expressions which are referrring to this parameter */
    UPDATE gmd_parsed_expression a
    SET expression_type = -1,
        expression_parm_id = P_tech_parm_id
    WHERE expression_type = 0
    AND   EXISTS (SELECT 1
                  FROM gmd_tech_parameters_b b
                  WHERE b.tech_parm_name = a.expression_key
                  AND   b.tech_parm_id = p_tech_parm_id)
    AND  EXISTS (SELECT 1
                 FROM  gmd_tech_parameters_b c
                 WHERE NVL(c.organization_id, -1) = NVL(p_orgn_id, -1)
                 AND   c.tech_parm_id =  a.tech_parm_id);
Line: 137

  * Procedure insert_expression_key
  *
  * Procedure:-  This procedure evaluates the key and inserts it as an operator or
  *              a parameter based on its value.
  *
  *********************************************************************************/
  PROCEDURE insert_expression_key
  (     p_orgn_id		IN	       NUMBER,
        p_tech_parm_id		IN	       NUMBER,
        p_key			IN	       VARCHAR2,
        x_return_status         OUT NOCOPY     VARCHAR2
  ) IS

    L_expression	VARCHAR2(80);
Line: 155

    INSERT_EXPRESSION_ERR	EXCEPTION;
Line: 171

        /* First insert the enclosing bracket to evaluate the expression piece seperately */
        add_expression_row (P_tech_parm_id	=> P_tech_parm_id,
                            P_key 		=> '(',
                            P_Type 		=> 1,
                            P_exp_parm_id	=> NULL,
                            X_return_status 	=> l_return_status);
Line: 178

          RAISE insert_expression_err;
Line: 188

          RAISE insert_expression_err;
Line: 198

          RAISE insert_expression_err;
Line: 202

        /* This is a pure techical parameter so lets insert it as an operand */
        add_expression_row (P_tech_parm_id	=> P_tech_parm_id,
                            P_key 		=> P_key,
                            P_Type 		=> 0,
                            P_exp_parm_id	=> NULL,
                            X_return_status 	=> l_return_status);
Line: 209

          RAISE insert_expression_err;
Line: 214

      /* Insert rollup type operators with a different p type */
      IF P_key IN ('ISUM', 'BSUM') THEN
        add_expression_row (P_tech_parm_id	=> P_tech_parm_id,
                            P_key 		=> P_key,
                            P_Type 		=> 2,
                            P_exp_parm_id	=> NULL,
                            X_return_status 	=> l_return_status);
Line: 222

          RAISE insert_expression_err;
Line: 231

          RAISE insert_expression_err;
Line: 241

        RAISE insert_expression_err;
Line: 250

    WHEN insert_expression_err THEN
      x_return_status := l_return_status;
Line: 253

      fnd_msg_pub.add_exc_msg ('GMD_EXPRESSION_UTIL', 'Insert_Expression_Key');
Line: 255

  END insert_expression_key;
Line: 295

      SELECT tech_parm_id, data_type
      FROM   gmd_tech_parameters_b
      WHERE  tech_parm_name = V_parameter
      AND    NVL(organization_id, -1) = NVL(v_orgn_id, -1)
      AND    delete_mark = 0;
Line: 343

  * Procedure:-  This procedure inserts the key to the temporary table
  *
  *********************************************************************************/
  PROCEDURE add_expression_row
  (     p_tech_parm_id		IN	        NUMBER,
        p_key			IN	        VARCHAR2,
        p_type		        IN     	        VARCHAR2,
	p_data_type		IN		NUMBER,
        p_exp_parm_id		IN	        NUMBER,
        x_return_status		OUT NOCOPY	VARCHAR2
  ) IS
    l_user_id		NUMBER(15) DEFAULT FND_PROFILE.VALUE('USER_ID');
Line: 359

    INSERT INTO GMD_PARSED_EXPRESSION (tech_exp_seq_id, tech_parm_id, expression_key, expression_type,
                                       expression_parm_id, creation_date, created_by, last_updated_by,
                                       last_update_date,data_type)
    VALUES (gmd_tech_exp_seq_id_s.nextval, p_tech_parm_id, p_key, p_type, p_exp_parm_id, sysdate, l_user_id,
            l_user_id, sysdate,p_data_type);
Line: 419

        l_exp_tab.delete(1,l_count);
Line: 471

        l_expression_tab.delete (l_start, l_end);
Line: 517

      SELECT qty_mass, qty_vol
      FROM   gmd_material_details_gtmp
      WHERE  line_id = V_line_id;
Line: 522

      SELECT value
      FROM gmd_technical_data_gtmp
      WHERE line_id = v_line_id
      AND   tech_parm_name = V_parameter;
Line: 572

      SELECT expression_key, expression_type
      FROM   gmd_parsed_expression p
      WHERE  (expression_type <> -1 or
              p.tech_parm_id = expression_parm_id)
      START WITH p.tech_parm_id = V_parm_id
      CONNECT BY PRIOR expression_parm_id = p.tech_parm_id
      AND PRIOR p.tech_parm_id <> PRIOR expression_parm_id
      ORDER SIBLINGS BY tech_exp_seq_id; /* Bug No. 6044965 */
Line: 583

      SELECT line_id
      FROM   gmd_material_details_gtmp a
      WHERE  entity_id = p_entity_id
      AND    rollup_ind = 1
      AND    EXISTS (SELECT 1
                     FROM gmd_material_details_gtmp b
                     WHERE  line_type = V_line_type
                     AND    entity_id = p_entity_id
                     AND    a.parent_line_id = b.parent_line_id);