Why does running this query with EXECUTE IMMEDIATE cause it to fail?

前端 未结 1 609
抹茶落季
抹茶落季 2020-12-11 02:38

I am writing a PL/SQL procedure that needs to to dynamically generate some queries, one of which involves creating a temporary table using results from a query taken as a pa

相关标签:
1条回答
  • 2020-12-11 03:24

    Try to lose the ";" from inside the string that you Execute Immediate.

    EXECUTE IMMEDIATE  'CREATE GLOBAL TEMPORARY TABLE tmp_tab AS (' || query || ')';
    
    0 讨论(0)
提交回复
热议问题