Sidebar

How to escape curly braces when calling stored procedures?

0 votes
60 views
asked Jul 20 by rich-c-2789 (15,190 points)

When I try to call a stored procedure using the "Procedure CALL Escape Sequence" the call is removed.
This

"{ CALL [dbo].[uspGetEmployeeManagers](:employeeId) }"

becomes this

""

1 Answer

0 votes
 
Best answer

QIE supports using the "Procedure CALL Escape Sequence" but the curly braces need to be converted to numeric character references.

The syntax from https://docs.oracle.com/cd/E13157_01/wlevs/docs30/jdbc_drivers/sqlescape.html is:

"A procedure is an executable object stored in the data store. Generally, it is one or more SQL statements that have been precompiled. The escape sequence for calling a procedure is:

{[?=]call procedure-name[([parameter][,parameter]...)]}

where:

procedure-name specifies the name of a stored procedure.

parameter specifies a stored procedure parameter."

For use in QIE replace { with { and } with }

Example:

{[?=]call procedure-name[([parameter][,parameter]...)]}

NOTE: Calling stored procedures with vendor specific syntax is also supported.

For other examples of where curly braces need to be escaped see

How to escape curly braces in QIE?

answered Jul 20 by rich-c-2789 (15,190 points)
selected Jul 20 by rich-c-2789
...