Database Tuning (MOSC)

MOSC Banner

insert fails with distinct

edited Apr 26, 2012 1:25AM in Database Tuning (MOSC) 12 commentsAnswered
INSERT INTO ihub.tmp_component_substitutes(
        usage_quantity,
        priority,
        organization_code,      
        assembly_name,
        component_name,
        operation_seq_code,
        effectivity_date,
        sub_item_name,
        alternate_bom_designator,
        sr_instance_code,
        deleted_flag,
        last_update_date,
        last_updated_by,
        creation_date,
        created_by,
        last_update_login,
        request_id,
        program_application_id,
        program_id,
        program_update_date,
        PROCESS_FLAG
    )  
SELECT DISTINCT
               (
                h.qty_per * i.conversion_rate),
                i.sub_priority_nbr,
                'P'||':'|| a.business_unit,
                h.inv_item_id,
                h.component_id,
                CASE WHEN h.op_sequence = 0 THEN 1 ELSE h.op_sequence END,
                i.effdt_to,
                i.sub_itm_id,
                CASE WHEN f.bom_code = ii.bom_code THEN NULL ELSE f.bom_code END,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center