home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,231 of 2,288   
   Terry Coccoli to Terry Coccoli   
   Re: Missing Parenthese Error: ORA-00907   
   05 Apr 04 22:53:30   
   
   From: request@ifneeded.com   
      
   Terry Coccoli wrote:   
      
   > Anyone see anything wrong with this:   
   >   
   >   
   > create or replace function HourParser(DayTimeValue In Integer) return   
   > varchar2 is   
   >   Result varchar2(20);   
   > begin   
   >      Execute Immediate   
   >      'SELECT CASE (WHEN :x > 1) THEN "YES" END   
   >       FROM DUAL' Into Result Using DayTimeValue;   
   >   
   > Return(result);   
   > end HourParser;   
   >   
      
      
   I fixed this one.  The double quotes were replaced by consecutive single   
   quotes, and for a reason unknown to me, I had to remove the parentheses.   
      
   But I have another question now.  I expanded on the above CASE statement   
   so that I now reference :x 10 times.  It seems that the USING clause has   
   to look something like   
      
   USING DayTimeValue, DayTimeValue, DayTimeValue....,DayTimeValue (10th   
   iteration) or else I get an 'ORA-01008:not all bind variables bound' error.   
      
   Is there any way to simplify the Using clause for a situation where I   
   need to continually reference the bind variable ?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca