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,252 of 2,288   
   AnaCDent to All   
   Re: ORA-00911 in Dynamic SQL   
   08 Apr 04 17:12:34   
   
   From: anacedent@hotmail.com   
      
   traceable1 wrote:   
   > I am trying to create a stored procedure with dynamic sql referencing   
   > the V$SESSION table (view).  I need to use this dynamically, because   
   > the procedure will not compile if the user does not have access to   
   > this table.  The $ is what's causing the trouble:   
   >   
   > declare v_sql varchar2(4000);   
   > begin   
   > v_sql := 'select * from v$session;';   
   > execute immediate (v_sql);   
   > end;   
   > /   
   >   
   >   
   > I've tried \ and double quotes, but they don't work.  Any clues?   
   >   
   > THANK YOU!!!!   
   >   
   > trace   
      
   declare v_sql varchar2(4000);   
   begin   
   v_sql := 'select * from v$session';   
   execute immediate v_sql;   
   end;   
   /   
      
   --- 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