dbo.obtener_ramos

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

1
Name Data Type Length Description
@viejos_nuevos char 1

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

/*Esto es parte de tab Formales*/
--select * from ramos where cod_ramo = 101 and cod_subramo = 0
CREATE OR ALTER PROCEDURE dbo.obtener_ramos  
@viejos_nuevos char(1) = 'T'
AS
BEGIN
 SET NOCOUNT ON;
 /*
  if (@viejos_nuevos = 'N')
  begin
  SELECT * FROM ramos where cod_ramo >= 99 
   ORDER BY cod_ramo, cod_subramo
  end
  else
  begin 
  SELECT * FROM ramos ORDER BY cod_ramo, cod_subramo
  end 
  */

 if (@viejos_nuevos = 'N')
 begin
  SELECT * FROM ramos 
   where cod_ramo >= 99 
     and (formulario is null or formulario = 883)
   ORDER BY cod_ramo, cod_subramo
 end
 else
 begin 
  SELECT * FROM ramos where formulario is null or formulario = 883 
  ORDER BY cod_ramo, cod_subramo
 end 
 
END

/*
select * from datos_sociedades where cuit = '30641368977'
select * from ramos where cod_ramo = 28
*/


GO

Depends On

1

Used By

No items found