Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
2| Name | Data Type | Length | Description |
|---|---|---|---|
| @contraparte | int | 4 | |
| @accion | varchar | 200 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.comprobar_trazabilidad
@contraparte int,
@accion varchar(200)
AS
BEGIN
SET NOCOUNT ON;
declare @cantidad int = 0
set @cantidad = (select count(*) from trazabilidad where contraparte = @contraparte and accion = @accion)
if(@cantidad > 0 )
begin
select 'no_insertar' as respuesta
end
else
begin
select 'insertar' as respuesta
end
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.comprobar_trazabilidad
@contraparte int,
@accion varchar(200)
AS
BEGIN
SET NOCOUNT ON;
declare @cantidad int = 0
set @cantidad = (select count(*) from trazabilidad where contraparte = @contraparte and accion = @accion)
if(@cantidad > 0 )
begin
select 'no_insertar' as respuesta
end
else
begin
select 'insertar' as respuesta
end
END
GO
Depends On
1Used By
No items found