I would like to pass a list of parameters to a procedure, how to do this process?
I did some research and found that it is possible to create a TABLE TYPE and use it in the procedure parameters, but I could not use it, for example.
CREATE TYPE TABLE_EXEC_PROCEDURE_MASSIVE_EXCHANGE_RELEASE_IMPORTED_FILE AS TABLE
(
ID_MASSIVE_EXCHANGE UNIQUEIDENTIFIER NOT NULL,
ID_IMPORTED_FILE_MASSIVE_EXCHANGE UNIQUEIDENTIFIER NOT NULL,
POSICAO INT NOT NULL,
USUARIO_EMAIL VARCHAR(250) NOT NULL,
USUARIO_NOME VARCHAR(250) NOT NULL,
JUSTIFICATIVA VARCHAR(MAX) NOT NULL
)
CREATE PROCEDURE SP_EXEC_MASSIVE_EXCHANGE_RELEASE_IMPORTED_FILE
@TABLE TABLE_EXEC_PROCEDURE_MASSIVE_EXCHANGE_RELEASE_IMPORTED_FILE READONLY AS
BEGIN
END
Would anyone have an example?