Home » Developer & Programmer » Forms » Case is not working in Forms Why? (Form 6i, windows xp)
Case is not working in Forms Why? [message #297808] Sun, 03 February 2008 21:06 Go to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi Friends,

Im using Forms 6i when i am try to using this query im getting compilation error.

Select 
      x.emplcode,
      case when cb_cl > 0 then 7 else cb_cl+7 end cbcl,
      cb_sl+7 cbsl,
      cb_pl+crpl cbpl
from (Select a.Emplcode,
             Cb_Cl,
             Cb_Sl,
             Cb_Pl,
             a.Unitid
        FROM EMPL_LEAVE_CARD a,emplmast b
       WHERE MONTHNO = 12 
         AND YEARNO = 2007 
         And a.Unitid = 1 
         and a.emplcode = b.emplcode 
         and substr(catgcode,1,1) not in ('W','A','T') 
         and empstatus not in ('L','D','V')) x,
     (select emplcode,
             Least(trunc(present,-1)/20,14) crpl 
       from (Select a.emplcode,
                    sum(presentdays)+sum(compoffdays) present
               from attendance a,emplmast b 
              where yearno = 2007 
                and a.emplcode = b.emplcode 
                and b.empstatus not in ('L','D','V') 
                and substr(catgcode,1,1) not in ('W','A','T')
                and a.unitid = 1
               group by A.emplcode,yearno)) y

where x.emplcode = y.emplcode


wbr
kanish
Re: Case is not working in Forms Why? [message #297830 is a reply to message #297808] Sun, 03 February 2008 23:04 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that PL/SQL engine used in your Forms version doesn't support CASE. Try to rewrite it using the DECODE function.
Re: Case is not working in Forms Why? [message #297892 is a reply to message #297830] Mon, 04 February 2008 03:25 Go to previous messageGo to next message
bbaz
Messages: 138
Registered: April 2007
Senior Member
Littlefoot is Right.

Below is a related thread on Oracle Website:
http://forums.oracle.com/forums/thread.jspa?messageID=2307180&tstart=0
Re: Case is not working in Forms Why? [message #297976 is a reply to message #297808] Mon, 04 February 2008 06:44 Go to previous message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

hi
Thanks for all

wbr
kanish
Previous Topic: Export query to excel
Next Topic: Insert OCX Object Programatically
Goto Forum:
  


Current Time: Thu Dec 08 18:17:44 CST 2016

Total time taken to generate the page: 0.05354 seconds