Include procedure


#1

I need to include a procedure in uipath, however it is giving error, I can connect in sql normally but when I try to include the error procedure, could someone help me?
below the procedure that I need to includeMain.xaml (7.3 KB)

USE [DB_TOP_NEXTEL_DEV]
GO
/****** Object: StoredProcedure [dbo].[SP_Get_CasosBoleto] Script Date: 24/08/2018 11:00:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[SP_Get_CasosBoleto]
(
@question_id int
@Numero int

)
AS
Begin

UPDATE Tabulador SET 

ControleBoleto =0
where ControleBoleto is null

UPDATE CasoEnvioBoleto SET 

ControleRobo =0
where ControleRobo is null

– RETURN @Numero
–Extração dos Dados de Boleto
delete from CasoEnvioBoleto where Numero is null
delete from CasoEnvioBoleto where EMail is null
delete from CasoEnvioBoleto where EMail like ‘%N@N.COM.BR%’
delete from CasoEnvioBoleto where EMail like ‘%N@N%’
delete from CasoEnvioBoleto where EMail = ’ na’

select distinct tb.Numero,
– CEB.[Status],
*from Tabulador tb with (nolock)
–join CasoEnvioBoleto CEB with (nolock) on tb.numero = CEB.Numero

where
– CEB.Status in(0,1)
–CEB.Status not in(3,9,11,7,5,12)
–and
tb.ControleBoleto is null
and tb.Tabulacao like ‘%| PROCEDENTE%|%’
and tb.Tabulacao like ‘%| NC%|%’
–and tb.Tabulacao like ‘%COM.BR|%’ or(tb.Tabulacao like ‘%COM|%’)
and EtapaExecucao = 500
–and not exists(select Numero from CasoEnvioBoleto WITH (NOLOCK) where Numero = tb.numero)
–and not exists (select Numero from CasoEnvioBoleto CEB WITH (NOLOCK) where [Status] not in(3,9,11,7,5,12) )
and CAST(tb.DataAlteracao as date) >CAST(getdate()-3 as date)
order by tb.DataAlteracao desc

end