Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_cuit | varchar | 20 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Samuel Gonzalez>
-- Create date: <25 Ago 2017>
-- Description: <Almacenar padron que no tiene pdf en servicio externo>
-- =============================================
CREATE OR ALTER PROCEDURE dbo.servicios_externos_procesar_cuit_sin_pdf_borrar
-- Add the parameters for the stored procedure here
--@p_id_padron int,
@p_cuit varchar(20)
AS
BEGIN
SET NOCOUNT ON;
declare @p_id_padron int = (select top 1 id_padron from padrones where identificacion = @p_cuit and habilitado = 1)
IF ((SELECT COUNT(*) FROM padron_sin_constancia WHERE (id_padron = @p_id_padron)) > 0)
BEGIN
BEGIN TRY
UPDATE padron_sin_constancia SET
visible = 0
WHERE (id_padron = @p_id_padron)
SELECT 0 AS error;
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE() AS error;
END CATCH
END
END
GO
GO
-- =============================================
-- Author: <Samuel Gonzalez>
-- Create date: <25 Ago 2017>
-- Description: <Almacenar padron que no tiene pdf en servicio externo>
-- =============================================
CREATE OR ALTER PROCEDURE dbo.servicios_externos_procesar_cuit_sin_pdf_borrar
-- Add the parameters for the stored procedure here
--@p_id_padron int,
@p_cuit varchar(20)
AS
BEGIN
SET NOCOUNT ON;
declare @p_id_padron int = (select top 1 id_padron from padrones where identificacion = @p_cuit and habilitado = 1)
IF ((SELECT COUNT(*) FROM padron_sin_constancia WHERE (id_padron = @p_id_padron)) > 0)
BEGIN
BEGIN TRY
UPDATE padron_sin_constancia SET
visible = 0
WHERE (id_padron = @p_id_padron)
SELECT 0 AS error;
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE() AS error;
END CATCH
END
END
GO
Depends On
2Used By
No items found