I need to run a query that contains the @NomeMaquina and @IdProcesso parameters, but when trying to include in the error uipath, could anyone help me?
below is the query I’m using
ALTER PROC [dbo].[ProObterProxCasoProcessamento]
@IdProcesso INT,
@nomeMaquina varchar(50)
AS
BEGIN
DECLARE @IdCaso INT
--REALIZA A CONSULTA PELO PRÓXIMO CASO DISPONÍVEL
SELECT TOP 1
@IdCaso = spc.IdCaso
FROM
statusprocessoscaso spc
WHERE
(
spc.IdStatus = 1
OR
(
spc.IdStatus = 2
AND
spc.DataAlteracao < DATEADD(MINUTE, -20, GETDATE())
)
OR
(
spc.IdStatus = 6
AND
spc.DataAlteracao < DATEADD(MINUTE, -20, GETDATE())
)
)
AND
spc.IdProcesso=@IdProcesso