Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Convert SQL server case statement to Oracle

Re: Convert SQL server case statement to Oracle

From: Jared Still <jkstill_at_bcbso.com>
Date: Mon, 30 Oct 2000 13:52:01 -0800 (PST)
Message-Id: <10665.120609@fatcity.com>


Is it just that I'm unable to see it, or is the CASE portion of this statement not included below?

Jraed

On Mon, 30 Oct 2000, Cale, Rick T (Richard) wrote:

> Hi All,
>
> I am trying to convert the following case stmt to Oracle but am stuck. I
> tried using DECODE but cannot
> handle the <= or <. Equal or Not equal I can convert by using decode.
> Any ideas?
>
> Thanks
> Rick
>
> WHEN EFF_DATE <= V_dStartDate AND END_DATE_ADJ <= V_dEndDate
> THEN COMP_LINK_EMIS_ADJ*DATEDIFF(SS,V_dStartDate
> ,END_DATE_ADJ)/3600*(OP_PCT/100)
>
> WHEN (EFF_DATE BETWEEN V_dStartDate AND V_dEndDate) AND END_DATE_ADJ >=
> V_dEndDate
> THEN COMP_LINK_EMIS_ADJ*DATEDIFF
> (SS,EFF_DATE,V_dEndDate)/3600*(OP_PCT/100)
>
> WHEN (EFF_DATE BETWEEN V_dStartDate AND V_dEndDate) AND (END_DATE_ADJ
> BETWEEN V_dStartDate AND V_dEndDate)
> THEN
> COMP_LINK_EMIS_ADJ*DATEDIFF(SS,EFF_DATE,END_DATE_ADJ)/3600*(OP_PCT/100)
>
> WHEN (EFF_DATE < V_dStartDate) AND (END_DATE_ADJ > V_dEndDate)
> THEN
> COMP_LINK_EMIS_ADJ*DATEDIFF(SS,V_dStartDate,V_dEndDate)/3600*(OP_PCT/100)
Received on Mon Oct 30 2000 - 15:52:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US