Topic
1 reply Latest Post - ‏2012-12-27T15:00:52Z by SystemAdmin
SystemAdmin
SystemAdmin
15496 Posts
ACCEPTED ANSWER

Pinned topic Case statement help

‏2012-12-27T13:00:27Z |
I need help in below case statement,could gurus please help.

case when(distil.DIL_SALES_ALT_FACT.TIME_NO between (distil.DIL_SALES_ALT_FACT.start_dt) and _add_years ( (distil.DIL_SALES_ALT_FACT.etl_date),-1)) then
(distil.DIL_SALES_ALT_FACT.INV_AMT)
else (o)
end

Thanks in advance.
Updated on 2012-12-27T15:00:52Z at 2012-12-27T15:00:52Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    15496 Posts
    ACCEPTED ANSWER

    Re: Case statement help

    ‏2012-12-27T15:00:52Z  in response to SystemAdmin
    Hi,

    try this
    case
    when(
    (distil.DIL_SALES_ALT_FACT.TIME_NO)
    between
    (distil.DIL_SALES_ALT_FACT.start_dt) and
    (_add_years ((distil.DIL_SALES_ALT_FACT.etl_date),-1))
    ) then
    (distil.DIL_SALES_ALT_FACT.INV_AMT)
    else (o)
    end

    Thanks