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 44,057 of 44,300   
   =?UTF-8?B?VmVyw7NuaWNhIFDDqXJleg==? to All   
   problem with execute immediate   
   27 Apr 21 02:36:05   
   
   From: salome2105@gmail.com   
      
   Hello,   
      
   I want to create a dynamic procedure that calls all the routines inside a   
   dataset   
      
   The query I am using is   
      
   DECLARE routine_list ARRAY;   
   DECLARE iter INT64 DEFAULT 0;   
   DECLARE query_string STRING;   
      
   SET routine_list = (   
      
      
     SELECT   
       array_agg(concat(@@project_id,'.',specific_schema,'.',specific_name))   
     FROM Mydataset.INFORMATION_SCHEMA.ROUTINES;   
      
   );   
      
   WHILE   
     iter < ARRAY_LENGTH(routine_list) DO   
       SET query_string = "CALL `" || routine_list[OFFSET(iter)] || "` ()";   
       EXECUTE IMMEDIATE query_string;   
       SET iter = iter + 1;   
   END WHILE;   
      
   the error   
   Errore durante l'esecuzione della query   
   SQL created by EXECUTE IMMEDIATE contains unsupported statement type:   
   CallStatement at [18:23]   
      
   do you know a better way to do this?? i don't want to list all the procedures   
   Thanks in advanced   
   Veronica   
      
   --- 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