home bbs files messages ]

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

   comp.databases.oracle.server      Oracle Sysadmins question their careers      44,300 messages   

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

   Message 42,482 of 44,300   
   amogh.r@gmail.com to All   
   EXECUTE IMMEDIATE DDL - Concatenate a re   
   20 Jun 16 04:27:10   
   
   Hello,   
      
   I am trying to concatenate a collection into a DDL executed using   
   execute immediate. Fails with an error -   
      
     create or replace type vartab as table of varchar2(4000);   
      
     create or replace function myfunc(var_tab vartab) return number   
     is begin   
       -- do something here   
       return 1;   
     end;   
     /   
      
     declare   
       fmtmap vartab := vartab('123456');   
     begin   
       execute immediate 'create table tab1 as select myfunc('||fmtmap||') a   
       from dual';   
     end;   
     /   
      
     >> PLS-00306: wrong number or types of arguments in call to '||'   
      
   Is this syntax not supported? Replacing fmtmap with any other scalar type   
   (number, varchar) type works.   
      
   Thanks much.   
      
   --- 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