dbo.Imperium_Duplicados_UPD

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

3
Name Data Type Length Description
@periodo int 4
@tipodoc int 4
@empleado int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE  dbo.Imperium_Duplicados_UPD
@periodo int,
@tipodoc int,
@empleado int

AS

BEGIN
 SET NOCOUNT ON;


update led_docs set estado_doc = 'J',compliance_doc='J',last_modified=getdate() where doc_id IN (
select  min(doc_id) as doc_id from led_docs where periodo = @periodo and tipo_doc = @tipodoc and empleado = @empleado and (replicated_doc_id is null or ingresado is null or vehiculo is null or verificado is null) and estado_doc in ('V')
)


END

GO

Depends On

1

Used By

No items found