Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
3| Name | Data Type | Length | Description |
|---|---|---|---|
| @id | int | 4 | |
| @estado | varchar | 20 | |
| @tiempo | decimal | 9 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.sp_servicios_pruebas
@id int,
@estado varchar(20),
@tiempo decimal(10,6)
AS
BEGIN
SET NOCOUNT ON;
--if (@estado = 'ERROR') set @tiempo = null
update servicios
set fecha_ultima_prueba = GETDATE(),
tiempo_promedio = @tiempo,
status_ultima_prueba = @estado
where servicio_id = @id
select 'ok'
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.sp_servicios_pruebas
@id int,
@estado varchar(20),
@tiempo decimal(10,6)
AS
BEGIN
SET NOCOUNT ON;
--if (@estado = 'ERROR') set @tiempo = null
update servicios
set fecha_ultima_prueba = GETDATE(),
tiempo_promedio = @tiempo,
status_ultima_prueba = @estado
where servicio_id = @id
select 'ok'
END
GO
Depends On
1Used By
No items found