EXECUTE IMMEDIATE DDL - Concatenate a record

From: <amogh.r_at_gmail.com>
Date: Mon, 20 Jun 2016 04:27:10 -0700 (PDT)
Message-ID: <c282f602-637a-45e7-9dbc-912bf94c6be1_at_googlegroups.com>



Hello,

[Quoted] [Quoted] 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. Received on Mon Jun 20 2016 - 13:27:10 CEST

Original text of this message