DBA Data[Home] [Help]

VIEW: APPS.EDW_BRES_DEPT_LCV

Source

View Text - Preformatted

SELECT DE.DEPARTMENT_CODE||'-'|| mp.organization_code||'-'|| inst.instance_code ,inst.instance_code ,decode(de.department_class_code, NULL, 'NA_EDW',de.department_class_code ||'-'||mp.organization_code||'-'|| inst.instance_code) ,nvl(DE.DEPARTMENT_CODE||'-'||mp.organization_code||'-'|| inst.instance_code,'NA_EDW') ,DE.DEPARTMENT_CODE||'('||mp.organization_code||')' ,substrb(DE.DEPARTMENT_CODE || '(' || mp.organization_code || ')' ,1,320) ,DE.DEPARTMENT_CODE||'('||mp.organization_code||')' ,substrb(DE.DESCRIPTION,1,240) ,DE.LAST_UPDATE_DATE ,DE.CREATION_DATE ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL FROM bom_departments de, mtl_parameters mp, edw_local_instance inst WHERE de.organization_id = mp.organization_id + 0 UNION ALL SELECT 'line-'||line.line_code||'-'||mp.organization_code||'-'|| inst.instance_code ,inst.instance_code ,'line-'||mp.organization_code||'-'|| inst.instance_code ,'line-'||line.line_code||'-'||mp.organization_code||'-'|| inst.instance_code ,substrb(ml.meaning||':'||line.line_code||'('|| mp.organization_code||')',1,240) ,substrb(ml.meaning||':'||line.line_code ||'('|| mp.organization_code||')' ,1,320) ,ml.meaning||':'||line.line_code||'('|| mp.organization_code||')' ,substrb(LINE.DESCRIPTION,1,240) ,LINE.LAST_UPDATE_DATE ,LINE.CREATION_DATE ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL FROM wip_lines line, mfg_lookups ml, mtl_parameters mp, edw_local_instance inst WHERE ml.lookup_type = 'CRP_REPORT_TYPE' AND ml.lookup_code = 1 AND line.organization_id = mp.organization_id WITH READ ONLY
View Text - HTML Formatted

SELECT DE.DEPARTMENT_CODE||'-'|| MP.ORGANIZATION_CODE||'-'|| INST.INSTANCE_CODE
, INST.INSTANCE_CODE
, DECODE(DE.DEPARTMENT_CLASS_CODE
, NULL
, 'NA_EDW'
, DE.DEPARTMENT_CLASS_CODE ||'-'||MP.ORGANIZATION_CODE||'-'|| INST.INSTANCE_CODE)
, NVL(DE.DEPARTMENT_CODE||'-'||MP.ORGANIZATION_CODE||'-'|| INST.INSTANCE_CODE
, 'NA_EDW')
, DE.DEPARTMENT_CODE||'('||MP.ORGANIZATION_CODE||')'
, SUBSTRB(DE.DEPARTMENT_CODE || '(' || MP.ORGANIZATION_CODE || ')'
, 1
, 320)
, DE.DEPARTMENT_CODE||'('||MP.ORGANIZATION_CODE||')'
, SUBSTRB(DE.DESCRIPTION
, 1
, 240)
, DE.LAST_UPDATE_DATE
, DE.CREATION_DATE
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
FROM BOM_DEPARTMENTS DE
, MTL_PARAMETERS MP
, EDW_LOCAL_INSTANCE INST
WHERE DE.ORGANIZATION_ID = MP.ORGANIZATION_ID + 0 UNION ALL SELECT 'LINE-'||LINE.LINE_CODE||'-'||MP.ORGANIZATION_CODE||'-'|| INST.INSTANCE_CODE
, INST.INSTANCE_CODE
, 'LINE-'||MP.ORGANIZATION_CODE||'-'|| INST.INSTANCE_CODE
, 'LINE-'||LINE.LINE_CODE||'-'||MP.ORGANIZATION_CODE||'-'|| INST.INSTANCE_CODE
, SUBSTRB(ML.MEANING||':'||LINE.LINE_CODE||'('|| MP.ORGANIZATION_CODE||')'
, 1
, 240)
, SUBSTRB(ML.MEANING||':'||LINE.LINE_CODE ||'('|| MP.ORGANIZATION_CODE||')'
, 1
, 320)
, ML.MEANING||':'||LINE.LINE_CODE||'('|| MP.ORGANIZATION_CODE||')'
, SUBSTRB(LINE.DESCRIPTION
, 1
, 240)
, LINE.LAST_UPDATE_DATE
, LINE.CREATION_DATE
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
FROM WIP_LINES LINE
, MFG_LOOKUPS ML
, MTL_PARAMETERS MP
, EDW_LOCAL_INSTANCE INST
WHERE ML.LOOKUP_TYPE = 'CRP_REPORT_TYPE'
AND ML.LOOKUP_CODE = 1
AND LINE.ORGANIZATION_ID = MP.ORGANIZATION_ID WITH READ ONLY