DBA Data[Home] [Help]

APPS.GHG_SOURCES_PKG SQL Statements

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

Line: 4

PROCEDURE insert_row (x_rowid                    IN OUT NOCOPY VARCHAR2,
                      x_source_id                              NUMBER,
                      x_source_name                            VARCHAR2,
                      x_unit_of_measure                        VARCHAR2,
                      x_attribute1                             VARCHAR2,
                      x_attribute2                             VARCHAR2,
                      x_attribute3                             VARCHAR2,
                      x_attribute4                             VARCHAR2,
                      x_attribute5                             VARCHAR2,
                      x_attribute6                             VARCHAR2,
                      x_attribute7                             VARCHAR2,
                      x_attribute8                             VARCHAR2,
                      x_attribute9                             VARCHAR2,
                      x_attribute10                            VARCHAR2,
                      x_attribute11                            VARCHAR2,
                      x_attribute12                            VARCHAR2,
                      x_attribute13                            VARCHAR2,
                      x_attribute14                            VARCHAR2,
                      x_attribute15                            VARCHAR2,
                      x_attribute16                            VARCHAR2,
                      x_attribute17                            VARCHAR2,
                      x_attribute18                            VARCHAR2,
                      x_attribute19                            VARCHAR2,
                      x_attribute20                            VARCHAR2,
                      x_attribute_category                     VARCHAR2,
                      x_created_by                             NUMBER,
                      x_creation_date                          DATE,
                      x_last_updated_by                        NUMBER,
                      x_last_update_date                       DATE,
                      x_last_update_login                      NUMBER,
                      x_org_id                                 NUMBER,
                      x_enabled                                VARCHAR2,
                      x_formula_id                             number,
                      x_ghg_uom_class_code                     VARCHAR2,
                      x_energy_type														 VARCHAR2) IS

v_debug_info VARCHAR2(100);
Line: 43

SELECT ROWID
FROM   GHG_SOURCES
WHERE  source_id = x_source_id;
Line: 49

  v_debug_info := 'Inserting into GHG_SOURCES';
Line: 51

  INSERT INTO GHG_SOURCES (source_id,
                                        source_name,
                                        unit_of_measure,
                                        attribute1,
                                        attribute2,
                                        attribute3,
                                        attribute4,
                                        attribute5,
                                        attribute6,
                                        attribute7,
                                        attribute8,
                                        attribute9,
                                        attribute10,
                                        attribute11,
                                        attribute12,
                                        attribute13,
                                        attribute14,
                                        attribute15,
                                        attribute16,
                                        attribute17,
                                        attribute18,
                                        attribute19,
                                        attribute20,
                                        attribute_category,
                                        created_by,
                                        creation_date,
                                        last_updated_by,
                                        last_update_date,
                                        last_update_login,
                                        org_id,
                                        enabled,
                                        formula_id,
                                        ghg_uom_class_code,
                                        energy_type)
  VALUES                               (x_source_id,
                                        x_source_name,
                                        x_unit_of_measure,
                                        x_attribute1,
                                        x_attribute2,
                                        x_attribute3,
                                        x_attribute4,
                                        x_attribute5,
                                        x_attribute6,
                                        x_attribute7,
                                        x_attribute8,
                                        x_attribute9,
                                        x_attribute10,
                                        x_attribute11,
                                        x_attribute12,
                                        x_attribute13,
                                        x_attribute14,
                                        x_attribute15,
                                        x_attribute16,
                                        x_attribute17,
                                        x_attribute18,
                                        x_attribute19,
                                        x_attribute20,
                                        x_attribute_category,
                                        x_created_by,
                                        x_creation_date,
                                        x_last_updated_by,
                                        x_last_update_date,
                                        x_last_update_login,
                                        x_org_id,
                                        x_enabled,
                                        x_formula_id,
                                        x_ghg_uom_class_code,
                                        x_energy_type);
Line: 147

END insert_row;
Line: 149

PROCEDURE update_row (x_rowid                    IN OUT NOCOPY VARCHAR2,
                      x_source_id                              NUMBER,
                      x_source_name                            VARCHAR2,
                      x_unit_of_measure                        VARCHAR2,
                      x_attribute1                             VARCHAR2,
                      x_attribute2                             VARCHAR2,
                      x_attribute3                             VARCHAR2,
                      x_attribute4                             VARCHAR2,
                      x_attribute5                             VARCHAR2,
                      x_attribute6                             VARCHAR2,
                      x_attribute7                             VARCHAR2,
                      x_attribute8                             VARCHAR2,
                      x_attribute9                             VARCHAR2,
                      x_attribute10                            VARCHAR2,
                      x_attribute11                            VARCHAR2,
                      x_attribute12                            VARCHAR2,
                      x_attribute13                            VARCHAR2,
                      x_attribute14                            VARCHAR2,
                      x_attribute15                            VARCHAR2,
                      x_attribute16                            VARCHAR2,
                      x_attribute17                            VARCHAR2,
                      x_attribute18                            VARCHAR2,
                      x_attribute19                            VARCHAR2,
                      x_attribute20                            VARCHAR2,
                      x_attribute_category                     VARCHAR2,
                      x_created_by                             NUMBER,
                      x_creation_date                          DATE,
                      x_last_updated_by                        NUMBER,
                      x_last_update_date                       DATE,
                      x_last_update_login                      NUMBER,
                      x_org_id                                 NUMBER,
                      x_enabled                                VARCHAR2,
                      x_formula_id                             number,
                      x_ghg_uom_class_code                     VARCHAR2,
                      x_energy_type														 VARCHAR2) IS

v_debug_info VARCHAR2(100);
Line: 191

  UPDATE GHG_SOURCES
  SET    source_id = x_source_id,
         source_name = x_source_name,
         unit_of_measure = x_unit_of_measure,
         attribute1 = x_attribute1,
         attribute2 = x_attribute2,
         attribute3 = x_attribute3,
         attribute4 = x_attribute4,
         attribute5 = x_attribute5,
         attribute6 = x_attribute6,
         attribute7 = x_attribute7,
         attribute8 = x_attribute8,
         attribute9 = x_attribute9,
         attribute10 = x_attribute10,
         attribute11 = x_attribute11,
         attribute12 = x_attribute12,
         attribute13 = x_attribute13,
         attribute14 = x_attribute14,
         attribute15 = x_attribute15,
         attribute16 = x_attribute16,
         attribute17 = x_attribute17,
         attribute18 = x_attribute18,
         attribute19 = x_attribute19,
         attribute20 = x_attribute20,
         attribute_category = x_attribute_category,
         created_by = x_created_by,
         creation_date = x_creation_date,
         last_updated_by = x_last_updated_by,
         last_update_date = x_last_update_date,
         last_update_login = x_last_update_login,
         org_id = x_org_id ,
         enabled = x_enabled,
         formula_id = x_formula_id,
         ghg_uom_class_code = x_ghg_uom_class_code,
         energy_type = x_energy_type
  WHERE  rowid = x_rowid;
Line: 244

END update_row;
Line: 246

PROCEDURE delete_row (x_source_id NUMBER) IS


v_debug_info VARCHAR2(100);
Line: 253

  DELETE FROM GHG_SOURCES
  WHERE  source_id = x_source_id;
Line: 274

END delete_row;
Line: 303

                    x_last_updated_by                        NUMBER,
                    x_last_update_date                       DATE,
                    x_last_update_login                      NUMBER,
                    x_org_id                                 NUMBER,
                    x_enabled                                VARCHAR2,
                    x_formula_id                             number,
                    x_ghg_uom_class_code                     VARCHAR2,
                    x_energy_type														 VARCHAR2) IS

v_debug_info VARCHAR2(100);
Line: 315

SELECT source_id,
       source_name,
       unit_of_measure,
       attribute1,
       attribute2,
       attribute3,
       attribute4,
       attribute5,
       attribute6,
       attribute7,
       attribute8,
       attribute9,
       attribute10,
       attribute11,
       attribute12,
       attribute13,
       attribute14,
       attribute15,
       attribute16,
       attribute17,
       attribute18,
       attribute19,
       attribute20,
       attribute_category,
       created_by,
       creation_date,
       last_updated_by,
       last_update_date,
       last_update_login,
       org_id,
       enabled,
       formula_id,
       ghg_uom_class_code,
       energy_type
FROM   GHG_SOURCES
WHERE  rowid = x_rowid
FOR UPDATE of source_id NOWAIT;
Line: 431

      AND ((recinfo.last_updated_by = x_last_updated_by) OR
           (recinfo.last_updated_by IS NULL AND x_last_updated_by IS NULL))
      AND ((recinfo.last_update_date = x_last_update_date) OR
           (recinfo.last_update_date IS NULL AND x_last_update_date IS NULL))
      AND ((recinfo.org_id = x_org_id) OR
           (recinfo.org_id IS NULL AND x_org_id IS NULL))
      AND ((recinfo.enabled = x_enabled) OR
           (recinfo.enabled IS NULL AND x_enabled IS NULL))
      AND ((recinfo.formula_id = x_formula_id) OR
           (recinfo.formula_id IS NULL AND x_formula_id IS NULL))
      AND ((recinfo.last_update_login = x_last_update_login) OR
          (recinfo.last_update_login IS NULL AND x_last_update_login IS NULL)))
  THEN
        NULL;
Line: 471

    SELECT count(*)
    into   v_row_count
    FROM   GHG_SOURCE_COMBINATIONS_ALL
    where  source_id = x_source_id;
Line: 488

    SELECT count(*)
    into   v_row_count
    FROM   GHG_SOURCES_ALL
    where  source_name = x_source_name
	and    org_id = x_org_id
    and    source_id <> NVL(x_source_id,-1);
Line: 507

    SELECT Count(*)
    INTO v_row_count
    FROM MTL_UNITS_OF_MEASURE_TL
	WHERE UNIT_OF_MEASURE = x_uom
	AND UOM_CLASS IN
		(SELECT UOM_CLASS
		FROM MTL_UNITS_OF_MEASURE
		WHERE UNIT_OF_MEASURE IN
			(SELECT STANDARD_UOM
			FROM GHG_UOM_CLASSES_ALL
			WHERE GHG_UOM_CLASS_CODE=x_ghg_uom_class
			)
		);
Line: 532

   select GHG_SOURCES_S.NEXTVAL
   into v_source_id
   from dual;