dbo.backend_obtener_integrantes_SC

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
-- =============================================
-- Author: <Samuel Gonzalez>
-- Create date: <20 Jul 2017>
-- Description: <obtener todos los integrantes con "nombre" o "documento" en la tabla sociedades_constituciones>
-- =============================================
CREATE OR ALTER PROCEDURE dbo.backend_obtener_integrantes_SC
 -- Add the parameters for the stored procedure here
 
AS
BEGIN
 -- SET NOCOUNT ON added to prevent extra result sets from
 -- interfering with SELECT statements.
 SET NOCOUNT ON;

    -- Insert statements for procedure here
  select distinct 

  sc.id_fide              as id, 
  sc.nombre_integrante    as nombre, 
  sc.documento_integrante as documento_1, 
  sc.nrdoc_int            as documento_2, 
  sc.cuit_int             as cuit_1, 
  sc.cuit_integrante      as cuit_2, 
  sc.domicilio_integrante as domicilio,
        sc.localidad_integrante as localidad,
        sc.provincia_integrante as provincia_1,
        sc.provincia_int        as provincia_2,
        sc.fecha_nacimiento_int as fecha_nac,
        sc.profesion_int        as profesion,
        sc.cargo                as cargo_1,
        sc.cargo_int            as cargo_2,
        sc.flag_int             as flag
 from sociedades_constituciones sc
    /*
        left join asignacion_cuits_sociedades_constituciones_log a
        on (sc.id_fide = a.id_sociedades_constituciones)
        */

 where (((sc.nombre_integrante is not null) and (sc.nombre_integrante != '')) 
  or ((sc.documento_integrante is not null) and (sc.documento_integrante != '')) 
  or ((sc.nrdoc_int is not null) and (sc.nrdoc_int != '')) 
  or ((sc.cuit_int is not null) and (sc.cuit_int != ''))
  or ((sc.cuit_integrante is not null) and (sc.cuit_integrante != '')))
        and (sc.flag_int is null)
END

GO

Used By

No items found