Monday, 14 March 2016

How to use case in where clause ?



select a.col1
      ,a.col2
      ,b.col1
      ,b.col2
from A a
    ,B b
where a.bookid=b.bookid
   and 1=
   (
   case
      when a.secid=0 and a.prodid=b.prodid then 1
      when a.secid=b.secid then 1
      else
         0
   end
   );

No comments:

Post a Comment

How to schedule PO workflow schedule process

create or replace PACKAGE APPS.XXXX_PO_WF_SCHEDULING_PKG IS    --|==========================================================================...