0 Replies Latest reply: Aug 23, 2012 8:31 AM by user10383617 RSS

    Oracle BAM Switch Function Not working as Expected

    user10383617
      I am using following code to create days bucket in VIEW. SCHEDULE_SHIP_DATE data type is datetime.
      This code shows me 61 for every test case. Even values are present for other case also like -1, -10.
      Please help me in this user case

      Switch((Now()-{SCHEDULE_SHIP_DATE})/86400)
      Case(-1):(15)
      Case(-2):(15)
      Case(-3):(15)
      Case(-4):(15)
      Case(-5):(15)
      Case(-6):(15)
      Case(-7):(15)
      Case(-8):(15)
      Case(-9):(15)
      Case(-10):(15)
      Case(-11):(15)
      Case(-12):(15)
      Case(-13):(15)
      Case(-14):(15)
      Case(-15):(15)

      Case(-16):(30)
      Case(-17):(30)
      Case(-18):(30)
      Case(-19):(30)
      Case(-20):(30)
      Case(-21):(30)
      Case(-22):(30)
      Case(-23):(30)
      Case(-24):(30)
      Case(-25):(30)
      Case(-26):(30)
      Case(-27):(30)
      Case(-28):(30)
      Case(-29):(30)
      Case(-30):(30)

      Case(-31):(60)
      Case(-32):(60)
      Case(-33):(60)
      Case(-34):(60)
      Case(-35):(60)
      Case(-36):(60)
      Case(-37):(60)
      Case(-38):(60)
      Case(-39):(60)
      Case(-40):(60)
      Case(-41):(60)
      Case(-42):(60)
      Case(-43):(60)
      Case(-44):(60)
      Case(-45):(60)
      Case(-46):(60)
      Case(-47):(60)
      Case(-48):(60)
      Case(-49):(60)
      Case(-50):(60)
      Case(-51):(60)
      Case(-52):(60)
      Case(-53):(60)
      Case(-54):(60)
      Case(-55):(60)
      Case(-56):(60)
      Case(-57):(60)
      Case(-58):(60)
      Case(-59):(60)
      Case(-60):(60)
      default(61)