PL/SQL (MOSC)

MOSC Banner

embedding variable values in raise_application_error error message

edited Oct 6, 2009 3:17AM in PL/SQL (MOSC) 12 commentsAnswered
 We're just starting to convert something like 1500 Sybase stored procedures to Oracle.  A great many of them use this sort of syntax in RAISERROR statements:

raiserror 100000 'Function %1! is not known.', @function_name

This syntax causes the value of @function_name to be placed in the resulting error message at the position identified by "%1!".  These messages are sent to client programs

I can not find nor deduce a similar capability in raise_application_error(), resorting to adding some extra code to hand-construct the error message into a error message variable and then using it in the raise_application_error().  For some data types and complex error messages we have, this adds some considerable complexity to the porting effort.

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