dbo.obtener_card_comex_ant

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

2
Name Data Type Length Description
@p_Cuit varchar 20
@periodo int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.obtener_card_comex_ant
@p_Cuit varchar(20),
@periodo int
AS

BEGIN
       SET NOCOUNT ON;
    select tipo_operacion,sum(valor_mensual) as total_anual,@periodo as anio 
      from comex_pais
  where cuit = @p_Cuit and  SUBSTRING(cast(periodo as varchar(13)),0,5) = @periodo 
    and pais='Totales'
     group by tipo_operacion
    


/*
select distinct top 3 ComercioExterior.anio ,sum(importe) as total_fob
from ComercioExterior where cuit = @p_Cuit

group by anio order by anio desc
*/

END

GO

Depends On

1

Used By

No items found