-
-
Notifications
You must be signed in to change notification settings - Fork 26
EXEC queries
Mark Carrington edited this page Sep 29, 2023
·
3 revisions
SQL 4 CDS translates EXEC
queries to execute a built-in message or custom action or custom API using stored procedure syntax.
The supported syntax is the same as SQL Server
with the exception that the OUTPUT
clause is not supported.
Not all messages, custom actions or custom APIs are supported. To be able to be invoked as a stored procedure, all request fields for the message (represented as input parameters to the stored procedure) must be scalar values (except for a single PagingInfo parameter if the output is an entity collection), and the response fields must be either:
a. A single field of an entity-derived type, or b. A single field of an entity collection, or c. Any number of fields of a scalar type
DECLARE @UserId UNIQUEIDENTIFIER
EXEC WhoAmI @UserId = @UserId OUTPUT
SELECT @UserId