zoukankan      html  css  js  c++  java
  • case ... end 语句

    Case......end 语句

    insert into bnd_consumption_demand

    (demand_id,

    INVENTORY_ITEM_ID,

    DEMAND_QTY,

    ORIGINAL_SOURCE_TYPE,

    original_ref_number,

    PROCESS_STATUS,

    CREATED_BY)

    values

    (v_demand_id,

    r_wo.inventory_item_id,

    r_wo.total_dd_qty,

    (case when r_wo.wip_entity_id > 0 then 3 when r_wo.wip_entity_id < 0 then 2 end),

    r_wo.wip_entity_id,

    0,

    fnd_global.USER_ID);

    -------------------------------------------------------------------------

    update bnd_wo_consumptions

    set remain_qty = remain_qty - v_consumption_qty,

    consumption_status = (case when(remain_qty - v_consumption_qty) > 0 then 0 else 1 end),

    last_update_date = sysdate

    case when userenv('CLIENT_INFO') is not null then

    (select gb.attribute1

    from gl_sets_of_books gb

    where set_of_books_id = (select set_of_books_id)

    from financials_system_params_all

    where org_id =userenv('CLIENT_INFO'))

    and rownum =1 )

    else 1 end

  • 相关阅读:
    常用命令
    经典算法
    框架
    计算机网络
    设计模式
    JVM
    数据库
    多线程
    Java中HashMap的底层实现原理
    构建大小顶堆
  • 原文地址:https://www.cnblogs.com/quanweiru/p/2616125.html
Copyright © 2011-2022 走看看