DBA Data[Home] [Help]

APPS.OPI_EDW_INV_DAILY_STAT_F_SZ SQL Statements

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

Line: 10

	 SELECT count(*)
           FROM mtl_material_transactions mmt
	  WHERE transaction_date >= p_from_date
	    AND transaction_date <= p_to_Date
       GROUP BY trunc(mmt.TRANSACTION_DATE),mmt.ORGANIZATION_ID,mmt.INVENTORY_ITEM_ID,
		  mmt.COST_GROUP_ID,mmt.REVISION,mmt.SUBINVENTORY_CODE,mmt.locator_id;
Line: 18

 select count(*) from (
    SELECT wdj.primary_item_id,wdj.bom_revision
      FROM wip_transactions wt,
           wip_discrete_jobs wdj
     WHERE wt.transaction_date between p_from_date
                            and p_to_Date
       AND wt.wip_entity_id = wdj.wip_entity_id
  GROUP BY wdj.primary_item_id,
            wdj.bom_revision
 UNION ALL
    SELECT we.primary_item_id,wrs.bom_revision
      FROM wip_transactions wt,
           wip_repetitive_schedules wrs,
           wip_entities we
     WHERE wt.transaction_date between p_from_date
                             and p_to_Date
       AND wt.wip_entity_id = wrs.wip_entity_id
       AND wt.wip_entity_id = we.wip_entity_id
  GROUP BY we.primary_item_id,
           wrs.bom_revision
 UNION ALL
    SELECT  wfs.primary_item_id,wfs.bom_revision
      FROM wip_transactions wt,
           wip_flow_schedules wfs
     WHERE wt.transaction_date between p_from_date
                             and p_to_Date
       AND wt.wip_entity_id = wfs.wip_entity_id
  GROUP BY wfs.primary_item_id,
            wfs.bom_revision );
Line: 128

x_LAST_UPDATE_DATE                         DATE;
Line: 189

  select
        avg(nvl(vsize(trunc(mmt.TRANSACTION_DATE)||mmt.ORGANIZATION_ID||mmt.INVENTORY_ITEM_ID||mmt.COST_GROUP_ID||mmt.REVISION||mmt.SUBINVENTORY_CODE||mmt.LOCATOR_ID),0)),
	avg(nvl(vsize(cost_group_id),0)),
	avg(nvl(vsize(mmt.INVENTORY_ITEM_ID||mmt.ORGANIZATION_ID),0)),
	avg(nvl(vsize(mmt.ORGANIZATION_ID),0)),
	avg(nvl(vsize(mmt.LOCATOR_ID||mmt.SUBINVENTORY_CODE||mmt.ORGANIZATION_ID),0)),
	avg(nvl(vsize(sum(primary_quantity)),0))
    from mtl_material_transactions mmt
   where transaction_date between p_from_date and p_to_date
GROUP BY trunc(mmt.TRANSACTION_DATE),mmt.ORGANIZATION_ID,mmt.INVENTORY_ITEM_ID,
		  mmt.COST_GROUP_ID,mmt.REVISION,mmt.SUBINVENTORY_CODE,mmt.locator_id;
Line: 203

     SELECT
          avg(nvl(vsize(sum(mta.BASE_TRANSACTION_VALUE)),0))
     FROM MTL_MATERIAL_TRANSACTIONS mmt,
          MTL_TRANSACTION_ACCOUNTS mta
    WHERE mmt.transaction_id = mta.transaction_id
      AND mta.accounting_line_type = 1
      AND ((mmt.transaction_action_id in (2,3,12)
           AND mmt.primary_quantity >0 )
          OR (mmt.transaction_action_id in (31,32)
              AND mmt.transaction_source_type_id=5))
      AND mmt.transaction_date >= p_from_date
      AND mmt.transaction_date <= p_to_date
 GROUP BY trunc(mmt.TRANSACTION_DATE),mmt.ORGANIZATION_ID,mmt.INVENTORY_ITEM_ID,mmt.COST_GROUP_ID,
          mmt.REVISION,mmt.SUBINVENTORY_CODE,mmt.LOCATOR_ID;
Line: 220

	SELECT
		avg(nvl(vsize(instance_code), 0))
	FROM	EDW_LOCAL_INSTANCE ;
Line: 225

	SELECT  avg(nvl(vsize(gsob.currency_code), 0))
        FROM    hr_all_organization_units hou,
                hr_organization_information hoi,
                gl_sets_of_books gsob
        WHERE   hou.organization_id  = hoi.organization_id
          AND ( hoi.org_information_context || '') ='Accounting Information'
          AND hoi.org_information1    = to_char(gsob.set_of_books_id)  ;