8 Replies Latest reply: Mar 25, 2013 11:09 AM by Srini VEERAVALLI RSS

    OBIEE- casting date to char in case functions

    NehaSSharma
      Hi All,

      I am trying to implement this scenario in Oracle Answers:

      Decode("Dim1".start_date,NULL,'NA',"Dim1".start_date)

      I have written something like this in answers:

      CASE WHEN "Dim1".start_date IS NULL THEN 'NA' ELSE "Dim1".start_date END

      I am getting error here since 'NA' is string type. If I do this:

      CASE WHEN "Dim1".start_date IS NULL THEN CAST('NA' AS DATE) ELSE "Dim1".start_date END

      I works fine..but is that correct way to code this scenario?Please help

      Regards,
      Neha