I would like to know whether or not there is a way to execute an unique SELECT and get the results into the respective output variables I have created?
Code:
PROCEDURE [DETALHES_DIVULGADO]
@ID_DIV INT,
@TURMA_FK SMALLINT OUTPUT,
@PERIODO_FK INT OUTPUT,
@PROFESSOR VARCHAR(60) OUTPUT,
@MONITORES VARCHAR(200) OUTPUT,
@VAGAS SMALLINT OUTPUT,
@MINVAGAS TINYINT OUTPUT,
@VLRCOMVINC SMALLMONEY OUTPUT,
@VLRSEMVINC SMALLMONEY OUTPUT,
@VLRESPECIAL SMALLMONEY OUTPUT,
@HORARIO VARCHAR(255) OUTPUT,
@LOCALIZACAO VARCHAR(255) OUTPUT,
@CONTATO VARCHAR(100) OUTPUT,
@OBS VARCHAR(255) OUTPUT,
@TIPO CHAR(1) OUTPUT,
@TEXTOEXCECAO VARCHAR(500) OUTPUT,
@DTINIINSC DATETIME OUTPUT,
@DTFIMINSC DATETIME OUTPUT
AS
is there a way?
for examplo:
SELECT @TURMA_FK, @PERIODO, ...??? = (SELECT TURMA_FK, PERIODO_FK, PROFESSOR, MONITORES, VAGAS,
MINVAGAS, VLRCOMVINC, VLRSEMVINC, VLRESPECIAL, HORARIO,LOCALIZACAO, CONTATO, OBS, TIPO, TEXTOEXCECAO, DTINIINSC, DTFIMINSC FROM DIVULGADO WHERE ID_DIV=@ID_DIV )
...