1 Reply Latest reply on Sep 28, 2013 11:32 AM by Frank Kulash

    Case stament



      can i write case statement in sql qry rather than decode..


      pls suggest me this..

        • 1. Re: Case stament
          Frank Kulash



          Sure; in Oracle 8.1 and higher, CASE can do anything that DECODE can do, and DECODE can do anything that CASE can do.

          Sometimes, DECODE involves a little less coding and is just as efficient.

          Other times, CASE involves much less coding, and is much more efficient.


          If you're having trouble using CASE, post an example.  Include your code, a little sample data (CREATE TABLE and INSERT statements, unless you're using commonly available tables, such as scott.emp), the results you want from that sample data, and an explanation of how you get those results from that data.

          Always say what version of Oracle you're using (e.g.

          See the forum FAQ: https://forums.oracle.com/message/9362002