PL/SQL (MOSC)

MOSC Banner

Dynamic statement using FORALL INSERT

in PL/SQL (MOSC) 2 commentsAnswered

Hi.

I have 3 INSERT statement that changes based on an input parameter. For example

  • T_ANN is the table for ANNUAL
  • T_PREV is the table for PREVISION
  • T_STANDARD is the table for STANDARD

The result set I want to insert, comes from a PL/SQL TABLE (REF_CURSOR), so I would like to use a dynamic FORALL to insert it into the table. The only thing that change is the table name. I'm looking for something like this:

  • EXECUTE IMMEDIATE 'insert_statment' USING table_to_insert

where

  • "table_to_insert" is the PL/SQL table from REF CURSOR
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center