Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
5| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_cuit | float | 8 | |
| @p_procedencia | int | 4 | |
| @p_fobusd | varchar | 30 | |
| @p_posicion | varchar | 10 | |
| @p_fecha | date | 3 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.ADUANA_expo_insertar
@p_cuit float,
@p_procedencia int,
@p_fobusd varchar(30),
@p_posicion varchar(10),
@p_fecha date
AS
BEGIN
BEGIN TRY
SET NOCOUNT ON;
-- select * from comex_exportaciones2 where fecha > '2023-03-31'
---truncate table comex_exportaciones2
/*select * from comex_exportaciones2 where fecha > '2023-03-31'
select top 100 * from comex_importaciones2
*/
--- select count(*) from comex_exportaciones2
-- select distinct fecha from comex_importaciones2 order by fecha
-- select count(*) from comex_exportaciones2 where fecha > '2020-08-31'
BEGIN
INSERT INTO comex_exportaciones
(cuit,procedencia,fobusd,posicion,fecha)
VALUES
(@p_cuit,@p_procedencia,@p_fobusd,@p_posicion,@p_fecha)
END
END TRY
BEGIN CATCH
--SELECT ERROR_MESSAGE()
END CATCH
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.ADUANA_expo_insertar
@p_cuit float,
@p_procedencia int,
@p_fobusd varchar(30),
@p_posicion varchar(10),
@p_fecha date
AS
BEGIN
BEGIN TRY
SET NOCOUNT ON;
-- select * from comex_exportaciones2 where fecha > '2023-03-31'
---truncate table comex_exportaciones2
/*select * from comex_exportaciones2 where fecha > '2023-03-31'
select top 100 * from comex_importaciones2
*/
--- select count(*) from comex_exportaciones2
-- select distinct fecha from comex_importaciones2 order by fecha
-- select count(*) from comex_exportaciones2 where fecha > '2020-08-31'
BEGIN
INSERT INTO comex_exportaciones
(cuit,procedencia,fobusd,posicion,fecha)
VALUES
(@p_cuit,@p_procedencia,@p_fobusd,@p_posicion,@p_fecha)
END
END TRY
BEGIN CATCH
--SELECT ERROR_MESSAGE()
END CATCH
END
GO
Depends On
1Used By
No items found