Acabo de re-crear el sp flaviovich y el resultado es el mismo...
este es el cod por si acaso.
Código Javascript
:
Ver originalCREATE PROCEDURE EMB_ACTUALIZA_PROG_MENSUAL_DIARIO
@DIA1 AS NUMERIC,
@DIA2 AS NUMERIC,
@DIA3 AS NUMERIC,
@DIA4 AS NUMERIC,
@DIA5 AS NUMERIC,
@DIA6 AS NUMERIC,
@DIA7 AS NUMERIC,
@DIA8 AS NUMERIC,
@DIA9 AS NUMERIC,
@DIA10 AS NUMERIC,
@DIA11 AS NUMERIC,
@DIA12 AS NUMERIC,
@DIA13 AS NUMERIC,
@DIA14 AS NUMERIC,
@DIA15 AS NUMERIC,
@DIA16 AS NUMERIC,
@DIA17 AS NUMERIC,
@DIA18 AS NUMERIC,
@DIA19 AS NUMERIC,
@DIA20 AS NUMERIC,
@DIA21 AS NUMERIC,
@DIA22 AS NUMERIC,
@DIA23 AS NUMERIC,
@DIA24 AS NUMERIC,
@DIA25 AS NUMERIC,
@DIA26 AS NUMERIC,
@DIA27 AS NUMERIC,
@DIA28 AS NUMERIC,
@DIA29 AS NUMERIC,
@DIA30 AS NUMERIC,
@DIA31 AS NUMERIC,
@ANIO AS NUMERIC,
@MES AS NUMERIC,
@LINEA AS NUMERIC,
@ID_PRODUCTO AS NUMERIC,
@ID_USUARIO AS NUMERIC,
@TIPO AS NVARCHAR(15)
/*FALTA SEMANA CERRADA*/
AS
DECLARE @FECHA DATETIME
DECLARE @ERROR NUMERIC
DECLARE @MENSAJE VARCHAR(150)
SET @ERROR=0
SET @FECHA=GETDATE()
BEGIN TRAN
IF @TIPO = 'MODIFICAR' BEGIN
UPDATE dbo.EMB_PROG_MENSUAL_DIARIO
SET DIA1=@DIA1, DIA2=@DIA2, DIA3=@DIA3, DIA4=@DIA4, DIA5=@DIA5,
DIA6=@DIA6, DIA7=@DIA7, DIA8=@DIA8, DIA9=@DIA9, DIA10=@DIA10,
DIA11=@DIA11, DIA12=@DIA12, DIA13=@DIA13, DIA14=@DIA14, DIA15=@DIA15,
DIA16=@DIA16, DIA17=@DIA17, DIA18=@DIA18, DIA19=@DIA19, DIA20=@DIA20,
DIA21=@DIA21, DIA22=@DIA22, DIA23=@DIA23, DIA24=@DIA24, DIA25=@DIA25,
DIA26=@DIA26, DIA27=@DIA27, DIA28=@DIA28, DIA29=@DIA29, DIA30=@DIA30,
DIA31=@DIA31,
ID_PERSONA_SEM=@ID_USUARIO,
FECHA_ESTADO_SEM=@FECHA
WHERE ANIO=@ANIO
AND MES=@MES
AND LINEA=@LINEA
AND ID_PRODUCTO=@ID_PRODUCTO
--AND ESTADO_SEM<>'CERRADO'
SET @ERROR=@ERROR+@@ERROR
END
IF @error=0 BEGIN
--select * from EMB_PROG_MENSUAL_DIARIO where ANIO=@ANIO AND MES=@MES AND LINEA=@LINEA AND ID_PRODUCTO=@ID_PRODUCTO --AND ESTADO_SEM<>'CERRADO'
SELECT 'Datos ingresados con Exito.'
COMMIT TRAN
END
ELSE BEGIN
SELECT 'Datos No ingresados. Ha ocurrido un error.'
ROLLBACK TRAN
END
quizás haya algo erróneo en el cód. ?¿
sl2