Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
3| Name | Data Type | Length | Description |
|---|---|---|---|
| @empleado | varchar | 20 | |
| @empleador | varchar | 20 | |
| @periodo | varchar | 4 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- EXEC BACKEND_ALTA_NOMINAS '27314335797','30642316156','0501'
CREATE OR ALTER PROCEDURE dbo.backend_alta_nominas
-- Add the parameters for the stored procedure here
@empleado varchar(20),
@empleador varchar(20),
@periodo varchar(4)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @cant int = 0
select @cant = count(*) from empleados where cuil=@empleado and cuit=@empleador and periodo = @periodo
if (@cant = 0)
begin
insert into empleados (cuil,cuit,periodo,visible,created)
values (@empleado,@empleador,@periodo,1,getdate())
end
--SELECT * FROM EMPLEADOS WHERE CUIL = '27314335797'
--EXEC backend_empleados '27314335797',
END
GO
GO
-- EXEC BACKEND_ALTA_NOMINAS '27314335797','30642316156','0501'
CREATE OR ALTER PROCEDURE dbo.backend_alta_nominas
-- Add the parameters for the stored procedure here
@empleado varchar(20),
@empleador varchar(20),
@periodo varchar(4)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @cant int = 0
select @cant = count(*) from empleados where cuil=@empleado and cuit=@empleador and periodo = @periodo
if (@cant = 0)
begin
insert into empleados (cuil,cuit,periodo,visible,created)
values (@empleado,@empleador,@periodo,1,getdate())
end
--SELECT * FROM EMPLEADOS WHERE CUIL = '27314335797'
--EXEC backend_empleados '27314335797',
END
GO
Depends On
1Used By
No items found