dbo.LN_Regenera_Legajos

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.LN_Regenera_Legajos 

AS
BEGIN
    SET NOCOUNT ON;
 declare @contra int
 DECLARE PcurLista CURSOR FOR
  select contraparte  from ln_contrapartes where contraparte in (
  select distinct contraparte from LN_contraparte_familias where familia in (select distinct familia from LN_familias where cliente = 5546348 and country_code in ('UY','PY') and visible = 1
  )) and activo = 1

 OPEN PcurLista
 FETCH NEXT FROM PcurLista INTO @contra
 WHILE @@fetch_status = 0
 BEGIN 
  SELECT @contra
  exec LN_actualizar_legajo @contra,null,null
  
  FETCH NEXT FROM PcurLista INTO @contra
 END  
 CLOSE PcurLista
 DEALLOCATE PcurLista

END
GO

Used By

No items found