9 Replies Latest reply on Dec 8, 2015 4:14 PM by Helan Kumar

    Is there any alternate for CASE statement in OBIEE 11g

    Helan Kumar

      My scenario is

      Current data :

      SHIP_TOBILL_TOSHIP_TO_NAME
      1000110005Minneapolis
      1000110004Minneapolis
      1000110003Minneapolis
      1000110002Minneapolis
      1000110001Minneapolis

       

      Requirement is : Report should return only the last row. i.e., When ever ship_to and bill_to columns are equal only those ship_to_name should be displayed and all other bill_to details should be omitted.

      Expected :

      SHIP_TOBILL_TOSHIP_TO_NAME

      PRIMARY_SHIP_TO_NAME

      1000110001MinneapolisMinneapolis

       

      I'm getting below result when i write a CASE statement.

      SHIP_TOBILL_TOSHIP_TO_NAME

      PRIMARY_SHIP_TO_NAME

      (CASE WHEN SHIP_TO = BILL_TO THEN SHIPT_TO_NAME END)

      1000110005MinneapolisNULL
      1000110004MinneapolisNULL
      1000110003MinneapolisNULL
      1000110002MinneapolisNULL
      1000110001MinneapolisMinneapolis

      This can be achieved by simply applying PRIMARY_SHIP_TO_NAME is NOT NULL in reporting. But i cant suggest this solution to users who all are creating ad hoc reports.

       

      PRIMARY_SHIP_TO_NAME is to be created in RPD(user needs this column for ad hoc reporting), there is nothing to display in ELSE part so by default it is displaying as NULL.

      Is there a way to over come this.