QSC_PRODUCT_STRUCTURES_V

Details

  • Schema: FUSION

  • Object owner: QSC

  • Object type: VIEW

Columns

Name

ID

PARENT_ID

ITEM_ID

ORG_ID

ITEM_NUMBER

ITEM_NAME

ITEM_DESCRIPTION

PARENT_ITEM_ID

PARENT_ORG_ID

PARENT_ITEM_NUMBER

PAREMT_ITEM_NAME

PARENT_ITEM_DESCRIPTION

ITEM_SEQ_NUMBER

START_DATE_TIME

END_DATE_TIME

Query

SQL_Statement

SELECT

str.bill_sequence_id id

, NULL parent_id

, stritem.inventory_item_id item_id

, stritem.organization_id org_id

, stritem.item_number item_number

, stritem.description item_name

, stritem.long_description item_description

, NULL parent_item_id

, NULL parent_org_id

, NULL parent_item_number

, NULL paremt_item_name

, NULL parent_item_description

, NULL item_seq_number

, NULL start_Date_Time

, NULL end_date_time

FROM egp_structures_b str

, egp_system_items_vl stritem

WHERE str.alternate_bom_designator = 'Primary'

AND str.pk1_value = TO_CHAR(stritem.inventory_item_id)

AND str.pk2_value = TO_CHAR(stritem.organization_id)

UNION

SELECT

DECODE(strparent.bill_sequence_id, NULL, comp.component_sequence_id, strparent.bill_sequence_id) id

, comp.bill_sequence_id parent_id

, compitem.inventory_item_id item_id

, compitem.organization_id org_id

, compitem.item_number item_number

, compitem.description item_name

, compitem.long_description item_description

, stritem.inventory_item_id parent_item_id

, stritem.organization_id parent_org_id

, stritem.item_number parent_item_number

, stritem.description parent_item_name

, stritem.long_description parent_item_description

, comp.item_num item_seq_number

, comp.effectivity_date start_date_time

, comp.disable_date end_date_time

FROM egp_structures_b str

, egp_components_b comp

, egp_system_items_vl stritem

, egp_system_items_vl compitem

, egp_structures_b strparent

WHERE str.alternate_bom_designator = 'Primary'

AND str.bill_sequence_id = comp.bill_sequence_id

AND comp.implementation_date IS NOT NULL

AND str.pk1_value = TO_CHAR(stritem.inventory_item_id)

AND str.pk2_value = TO_CHAR(stritem.organization_id)

AND comp.pk1_value = compitem.inventory_item_id

AND comp.pk2_value = compitem.organization_id

AND comp.pk1_value = strparent.pk1_value (+)

AND comp.pk2_value = strparent.pk2_value (+)