Is it possible to invoke a variable procedure name?
ChrisS.Sep 22 2009 — edited Sep 22 2009Is it possible - within a trigger or elsewhere - to invoke a stored procedure by using a variable containing the name of the procedure?
I would like to be able to use a different procedure depending upon the value in a column of the table to which a row is inserted.
If this is not possible, is there an elegant way to allow for the inclusion of as-yet-unknown record types, which I was hoping to be able to handle simply by adding a new procedure, with the new record type suffixed to its core name. Each such variation would perform some type-specific calculation before invoking a common procedure to do the standard processing.
I feel it ought to be possible but can find no example anywhere in the documentation of a procedure being invoked by anything other than a literal name.
Thanks in advance for any guidance.