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,259 of 2,288   
   .com to DottingTheNet   
   Re: create table in a procedure   
   09 Apr 04 07:28:09   
   
   From: mcstockX@Xenquery   
      
   "DottingTheNet"  wrote in message   
   news:11bf8d5a.0404082019.6fbd8738@posting.google.com...   
   | help plz!!   
   | when i try to cretae a table in a procedure like   
   |   
   | create procedure blah   
   | is   
   | begin   
   | create table.....   
   | .....   
   | end;   
   |   
   | i get error PLS-00103 stating that it encountered CREATE when   
   | expecting everything else..   
   |   
   | thnx!!   
      
      
   pl/sql directly supports DML only   
      
   to execute DDL (creates, etc) you need to dynamic SQL (execute immediate or   
   DBMS_SQL). you will also want to look into Autonomous Transactions.   
      
   but, as indicated by other posters, DDL in a production application is rare   
   in Oracle -- objects typically should all exist ahead of time, even   
   'temporary' tables (Oracle's concept is that the table is permanent, but the   
   data is temporary -- set CREATE ... GLOBAL TEMPORARY TABLE)   
      
   -{ mcs   
      
   --- 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