INSERT INTO Comentario(Objeto, Clave, ID, Operador, Fecha, Comentario )VALUES( 'Producto', '0000000057', '0000000001', 'DCOUOH', '2019-12-19 08:18:02', 'CAMPO (VALOR ANTERIOR => VALOR POSTERIOR) _______________________________________________________________Pr_Descripcion (CEPILLO CARRETERO 36' C/BASTON 1.50MTS => CEPILLO CARRETERO 36 C-BASTON 1.50MTS)Pr_Descripcion_Corta (CEPILLO CARRETERO 36' C/BASTO => CEPILLO CARRETERO 36 C-BASTO)Pr_Imagen (SI => NO)') SELECT GetDate() as Fecha SELECT ISNULL(MAX(ID), 0) as ID FROM Comentario WHERE Objeto = 'Producto' AND Clave = '0000000057' SELECT Producto.*, isnull(Producto_Precio.Pp_Precio_1,0) as Pp_Precio_1, isnull(Producto_Precio.Pp_Precio_2,0) as Pp_Precio_2, isnull(Producto_Precio.Pp_Precio_3,0) as Pp_Precio_3, isnull(Producto_Precio.Pp_Precio_4,0) as Pp_Precio_4, isnull(Producto_Precio.Pp_Precio_5,0) as Pp_Precio_5, isnull(Producto_Precio.Pp_Mk_1,0) as Pp_Mk_1, isnull(Producto_Precio.Pp_Mk_2,0) as Pp_Mk_2, isnull(Producto_Precio.Pp_Mk_3,0) as Pp_Mk_3, isnull(Producto_Precio.Pp_Mk_4,0) as Pp_Mk_4, isnull(Producto_Precio.Pp_Mk_5,0) as Pp_Mk_5, isnull(Producto_Descuento.Pd_Descuento_1,0) as Pd_Descuento_1, isnull(Producto_Descuento.Pd_Descuento_2,0) as Pd_Descuento_2, isnull(Producto_Descuento.Pd_Descuento_3,0) as Pd_Descuento_3, isnull(Producto_Descuento.Pd_Descuento_4,0) as Pd_Descuento_4, isnull(Producto_Descuento.Pd_Descuento_5,0) as Pd_Descuento_5 FROM Producto left JOIN Producto_Precio ON Producto_Precio.Pr_Cve_Producto = Producto.Pr_Cve_Producto left JOIN Producto_Descuento ON Producto_Descuento.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Producto.Pr_Cve_Producto = '0000000057' UPDATE Producto_Descuento SET Pd_Cantidad_1 = 0, Pd_Cantidad_2 = 0, Pd_Cantidad_3 = 0, Pd_Cantidad_4 = 0, Pd_Cantidad_5 = 0, Pd_Descuento_1 = 0, Pd_Descuento_2 = 0, Pd_Descuento_3 = 0, Pd_Descuento_4 = 0, Pd_Descuento_5 = 0, Oper_Ult_Modif = 'DCOUOH', Fecha_Ult_Modif = '2019-12-19 08:18:01' WHERE Pr_Cve_Producto = '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM Producto_Descuento WHERE Pr_Cve_Producto = '0000000057' UPDATE Producto_Precio SET Pp_Mk_1 = 0, Pp_Mk_2 = 0, Pp_Mk_3 = 0, Pp_Mk_4 = 0, Pp_Mk_5 = 0, Pp_Precio_1 = -1, Pp_Precio_2 = -1, Pp_Precio_3 = -1, Pp_Precio_4 = -1, Pp_Precio_5 = -1, Oper_Ult_Modif = 'DCOUOH', Fecha_Ult_Modif = '2019-12-19 08:18:01' WHERE Pr_Cve_Producto = '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM Producto_Precio WHERE Pr_Cve_Producto = '0000000057' Delete from Producto_Codigo_Proveedor Where Pr_Cve_Producto = '0000000057' Delete from Conversion_Unidad Where Pr_Cve_Producto = '0000000057' and cu_unidad_origen <> cu_unidad_destino INSERT INTO Impuesto_Grupo_Impuesto( Gi_Cve_Grupo_Impuesto, Pr_Cve_Producto, Im_Cve_Impuesto, Orden_Aplicacion, Oper_Alta, Fecha_Alta, Oper_Ult_Modif, Fecha_Ult_Modif) VALUES('0008', '0000000057', '0002', 1, 'DCOUOH', '2019-12-19 08:18:01', 'DCOUOH', '2019-12-19 08:18:01') SELECT * FROM RELACION_IMPUESTO_GRUPO_IMPUESTO WHERE IM_CVE_IMPUESTO = '0002' DELETE FROM Impuesto_Grupo_Impuesto WHERE Pr_Cve_Producto = '0000000057' DELETE Producto_Descripcion WHERE Pr_Cve_Producto = '0000000057' UPDATE Producto SET Pr_Cve_Producto = '0000000057', Pr_Imagen = 'NO', Ct_Cve_Categoria = '0008', Ln_Cve_Linea = '0012', Cm_Cve_Comprador = '0000', Pv_Cve_Proveedor = '0000000000', Pr_Dun_14_Cantidad = 0, Mr_Cve_Marca = '0000', Pr_Cuenta_Contable ='', Pr_Descripcion = 'CEPILLO CARRETERO 36 C-BASTON 1.50MTS', Pr_Descripcion_Corta = 'CEPILLO CARRETERO 36 C-BASTO', Pr_Barras = '9901079300002', Pr_DUN_14 = '', Pr_Venta_Consumo = 'CO', Pr_No_Validar_Margen = 'NO', Pr_Tipo_Gasto = '', Pr_Tipo_Activo_Fijo = '', Pr_Tipo_Producto = '01', Pr_Porcentaje_Variacion= 0, Pr_Numero_Parte = '', Pr_Unidad_Control_1 = 'PZ', Pr_Unidad_Control_2 = 'PZ', Pr_Tipo_Costeo = '01', Pr_Unidad_Costo = 'PZ', Pr_Clave_Corta = '010793', Pr_Unidad_Compra = 'PZ', Pr_Unidad_Venta = 'PZ', Pr_Unidad_Transferencia = 'PZ', Pr_Maneja_Talla = 'NO', Pr_Maneja_Color = 'NO', Pr_Dias_Caducidad = 0, Pr_Tiempo_Compra_Produce = 0, Pr_Rendimiento = 0, Pr_Compra_Produce = 'CO', Pr_Peso = 0, Pr_Volumen = 0, Pr_Moneda = 'MXN', Pr_Cuota_Fija = '0', Pr_Complemento_Fiscal = '', Pr_Fraccion_Arancelaria = '', Pr_Codigo_SAT = '0', Pr_UserDef_1 = '0050', Pr_UserDef_2 = '', Pr_UserDef_3 = 0, Pr_UserDef_4 = 0, Pr_UserDef_5 = '2019-12-03', Pr_UserDef_6 = '2019-12-03', Fm_Cve_Familia = '0029', Sf_Cve_Subfamilia = '0000', Pr_Costo_Estandar = 0, Pr_Ultimo_Costo = 0, Pr_Ultimo_Precio_Compra = 0, Dp_Cve_Departamento = '0000', Pr_Pedimento = 'NO', Pr_Caducidad = 'NO', Oper_Ult_Modif = 'DCOUOH', Fecha_Ult_Modif = '2019-12-19 08:18:01', Pr_Equivalencia_Inventario = 'NO', Pr_Equivalencia_Producto = '' WHERE Pr_Cve_Producto = '0000000057' SELECT Producto.*, isnull(Producto_Precio.Pp_Precio_1,0) as Pp_Precio_1, isnull(Producto_Precio.Pp_Precio_2,0) as Pp_Precio_2, isnull(Producto_Precio.Pp_Precio_3,0) as Pp_Precio_3, isnull(Producto_Precio.Pp_Precio_4,0) as Pp_Precio_4, isnull(Producto_Precio.Pp_Precio_5,0) as Pp_Precio_5, isnull(Producto_Precio.Pp_Mk_1,0) as Pp_Mk_1, isnull(Producto_Precio.Pp_Mk_2,0) as Pp_Mk_2, isnull(Producto_Precio.Pp_Mk_3,0) as Pp_Mk_3, isnull(Producto_Precio.Pp_Mk_4,0) as Pp_Mk_4, isnull(Producto_Precio.Pp_Mk_5,0) as Pp_Mk_5, isnull(Producto_Descuento.Pd_Descuento_1,0) as Pd_Descuento_1, isnull(Producto_Descuento.Pd_Descuento_2,0) as Pd_Descuento_2, isnull(Producto_Descuento.Pd_Descuento_3,0) as Pd_Descuento_3, isnull(Producto_Descuento.Pd_Descuento_4,0) as Pd_Descuento_4, isnull(Producto_Descuento.Pd_Descuento_5,0) as Pd_Descuento_5 FROM Producto left JOIN Producto_Precio ON Producto_Precio.Pr_Cve_Producto = Producto.Pr_Cve_Producto left JOIN Producto_Descuento ON Producto_Descuento.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Producto.Pr_Cve_Producto = '0000000057' SELECT Pr_Costo_Estandar FROM Producto WHERE Pr_Cve_Producto = '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM PRODUCTO_TALLA_COLOR WHERE Pr_Cve_Producto = '0000000057' AND Tl_Cve_Talla + Cl_Cve_Color = '0000' DELETE Producto_Kit WHERE Pr_Cve_Producto = '0000000057' DELETE Comprador_Proveedor_Producto WHERE Pr_Cve_Producto = '0000000057' AND Cm_Cve_Comprador = '0000' AND Pv_Cve_Proveedor = '0000000000' SELECT GetDate() as Fecha *** BEGIN TRANSACION *** SELECT Pr_Descripcion FROM Producto WHERE Pr_Barras = '9901079300002' AND Pr_Cve_Producto <> '0000000057' SELECT Ln_Descripcion AS Nombre FROM Linea WHERE Ln_Cve_LINEA = '0012' AND Es_Cve_Estado <> 'BA' SELECT Mr_Descripcion AS Nombre FROM Marca WHERE Mr_Cve_MARCA = '0000' AND Es_Cve_Estado <> 'BA' SELECT Ct_Descripcion AS Nombre FROM Categoria WHERE Ct_Cve_Categoria = '0008' AND Es_Cve_Estado <> 'BA' SELECT Pr_Descripcion FROM Producto WHERE Pr_Clave_Corta = '010793' AND Pr_Cve_Producto <> '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM Producto WHERE Pr_Clave_Corta = '010793' INSERT INTO Comentario(Objeto, Clave, ID, Operador, Fecha, Comentario )VALUES( 'Producto', '0000000057', '0000000001', 'DCOUOH', '2019-12-19 08:16:58', 'CAMPO (VALOR ANTERIOR => VALOR POSTERIOR) _______________________________________________________________Pr_Descripcion (CEPILLO CARRETERO 36' C/BASTON 1.50MTS => CEPILLO CARRETERO 36 C/BASTON 1.50MTS)Pr_Descripcion_Corta (CEPILLO CARRETERO 36' C/BASTO => CEPILLO CARRETERO 36 C/BASTO)Pr_Imagen (SI => NO)') SELECT GetDate() as Fecha SELECT ISNULL(MAX(ID), 0) as ID FROM Comentario WHERE Objeto = 'Producto' AND Clave = '0000000057' SELECT Producto.*, isnull(Producto_Precio.Pp_Precio_1,0) as Pp_Precio_1, isnull(Producto_Precio.Pp_Precio_2,0) as Pp_Precio_2, isnull(Producto_Precio.Pp_Precio_3,0) as Pp_Precio_3, isnull(Producto_Precio.Pp_Precio_4,0) as Pp_Precio_4, isnull(Producto_Precio.Pp_Precio_5,0) as Pp_Precio_5, isnull(Producto_Precio.Pp_Mk_1,0) as Pp_Mk_1, isnull(Producto_Precio.Pp_Mk_2,0) as Pp_Mk_2, isnull(Producto_Precio.Pp_Mk_3,0) as Pp_Mk_3, isnull(Producto_Precio.Pp_Mk_4,0) as Pp_Mk_4, isnull(Producto_Precio.Pp_Mk_5,0) as Pp_Mk_5, isnull(Producto_Descuento.Pd_Descuento_1,0) as Pd_Descuento_1, isnull(Producto_Descuento.Pd_Descuento_2,0) as Pd_Descuento_2, isnull(Producto_Descuento.Pd_Descuento_3,0) as Pd_Descuento_3, isnull(Producto_Descuento.Pd_Descuento_4,0) as Pd_Descuento_4, isnull(Producto_Descuento.Pd_Descuento_5,0) as Pd_Descuento_5 FROM Producto left JOIN Producto_Precio ON Producto_Precio.Pr_Cve_Producto = Producto.Pr_Cve_Producto left JOIN Producto_Descuento ON Producto_Descuento.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Producto.Pr_Cve_Producto = '0000000057' UPDATE Producto_Descuento SET Pd_Cantidad_1 = 0, Pd_Cantidad_2 = 0, Pd_Cantidad_3 = 0, Pd_Cantidad_4 = 0, Pd_Cantidad_5 = 0, Pd_Descuento_1 = 0, Pd_Descuento_2 = 0, Pd_Descuento_3 = 0, Pd_Descuento_4 = 0, Pd_Descuento_5 = 0, Oper_Ult_Modif = 'DCOUOH', Fecha_Ult_Modif = '2019-12-19 08:16:58' WHERE Pr_Cve_Producto = '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM Producto_Descuento WHERE Pr_Cve_Producto = '0000000057' UPDATE Producto_Precio SET Pp_Mk_1 = 0, Pp_Mk_2 = 0, Pp_Mk_3 = 0, Pp_Mk_4 = 0, Pp_Mk_5 = 0, Pp_Precio_1 = -1, Pp_Precio_2 = -1, Pp_Precio_3 = -1, Pp_Precio_4 = -1, Pp_Precio_5 = -1, Oper_Ult_Modif = 'DCOUOH', Fecha_Ult_Modif = '2019-12-19 08:16:58' WHERE Pr_Cve_Producto = '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM Producto_Precio WHERE Pr_Cve_Producto = '0000000057' Delete from Producto_Codigo_Proveedor Where Pr_Cve_Producto = '0000000057' Delete from Conversion_Unidad Where Pr_Cve_Producto = '0000000057' and cu_unidad_origen <> cu_unidad_destino INSERT INTO Impuesto_Grupo_Impuesto( Gi_Cve_Grupo_Impuesto, Pr_Cve_Producto, Im_Cve_Impuesto, Orden_Aplicacion, Oper_Alta, Fecha_Alta, Oper_Ult_Modif, Fecha_Ult_Modif) VALUES('0008', '0000000057', '0002', 1, 'DCOUOH', '2019-12-19 08:16:58', 'DCOUOH', '2019-12-19 08:16:58') SELECT * FROM RELACION_IMPUESTO_GRUPO_IMPUESTO WHERE IM_CVE_IMPUESTO = '0002' DELETE FROM Impuesto_Grupo_Impuesto WHERE Pr_Cve_Producto = '0000000057' DELETE Producto_Descripcion WHERE Pr_Cve_Producto = '0000000057' UPDATE Producto SET Pr_Cve_Producto = '0000000057', Pr_Imagen = 'NO', Ct_Cve_Categoria = '0008', Ln_Cve_Linea = '0012', Cm_Cve_Comprador = '0000', Pv_Cve_Proveedor = '0000000000', Pr_Dun_14_Cantidad = 0, Mr_Cve_Marca = '0000', Pr_Cuenta_Contable ='', Pr_Descripcion = 'CEPILLO CARRETERO 36 C/BASTON 1.50MTS', Pr_Descripcion_Corta = 'CEPILLO CARRETERO 36 C/BASTO', Pr_Barras = '9901079300002', Pr_DUN_14 = '', Pr_Venta_Consumo = 'CO', Pr_No_Validar_Margen = 'NO', Pr_Tipo_Gasto = '', Pr_Tipo_Activo_Fijo = '', Pr_Tipo_Producto = '01', Pr_Porcentaje_Variacion= 0, Pr_Numero_Parte = '', Pr_Unidad_Control_1 = 'PZ', Pr_Unidad_Control_2 = 'PZ', Pr_Tipo_Costeo = '01', Pr_Unidad_Costo = 'PZ', Pr_Clave_Corta = '010793', Pr_Unidad_Compra = 'PZ', Pr_Unidad_Venta = 'PZ', Pr_Unidad_Transferencia = 'PZ', Pr_Maneja_Talla = 'NO', Pr_Maneja_Color = 'NO', Pr_Dias_Caducidad = 0, Pr_Tiempo_Compra_Produce = 0, Pr_Rendimiento = 0, Pr_Compra_Produce = 'CO', Pr_Peso = 0, Pr_Volumen = 0, Pr_Moneda = 'MXN', Pr_Cuota_Fija = '0', Pr_Complemento_Fiscal = '', Pr_Fraccion_Arancelaria = '', Pr_Codigo_SAT = '0', Pr_UserDef_1 = '0050', Pr_UserDef_2 = '', Pr_UserDef_3 = 0, Pr_UserDef_4 = 0, Pr_UserDef_5 = '2019-12-03', Pr_UserDef_6 = '2019-12-03', Fm_Cve_Familia = '0029', Sf_Cve_Subfamilia = '0000', Pr_Costo_Estandar = 0, Pr_Ultimo_Costo = 0, Pr_Ultimo_Precio_Compra = 0, Dp_Cve_Departamento = '0000', Pr_Pedimento = 'NO', Pr_Caducidad = 'NO', Oper_Ult_Modif = 'DCOUOH', Fecha_Ult_Modif = '2019-12-19 08:16:58', Pr_Equivalencia_Inventario = 'NO', Pr_Equivalencia_Producto = '' WHERE Pr_Cve_Producto = '0000000057' SELECT Producto.*, isnull(Producto_Precio.Pp_Precio_1,0) as Pp_Precio_1, isnull(Producto_Precio.Pp_Precio_2,0) as Pp_Precio_2, isnull(Producto_Precio.Pp_Precio_3,0) as Pp_Precio_3, isnull(Producto_Precio.Pp_Precio_4,0) as Pp_Precio_4, isnull(Producto_Precio.Pp_Precio_5,0) as Pp_Precio_5, isnull(Producto_Precio.Pp_Mk_1,0) as Pp_Mk_1, isnull(Producto_Precio.Pp_Mk_2,0) as Pp_Mk_2, isnull(Producto_Precio.Pp_Mk_3,0) as Pp_Mk_3, isnull(Producto_Precio.Pp_Mk_4,0) as Pp_Mk_4, isnull(Producto_Precio.Pp_Mk_5,0) as Pp_Mk_5, isnull(Producto_Descuento.Pd_Descuento_1,0) as Pd_Descuento_1, isnull(Producto_Descuento.Pd_Descuento_2,0) as Pd_Descuento_2, isnull(Producto_Descuento.Pd_Descuento_3,0) as Pd_Descuento_3, isnull(Producto_Descuento.Pd_Descuento_4,0) as Pd_Descuento_4, isnull(Producto_Descuento.Pd_Descuento_5,0) as Pd_Descuento_5 FROM Producto left JOIN Producto_Precio ON Producto_Precio.Pr_Cve_Producto = Producto.Pr_Cve_Producto left JOIN Producto_Descuento ON Producto_Descuento.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Producto.Pr_Cve_Producto = '0000000057' SELECT Pr_Costo_Estandar FROM Producto WHERE Pr_Cve_Producto = '0000000057' SELECT Pr_Cve_Producto AS Nombre FROM PRODUCTO_TALLA_COLOR WHERE Pr_Cve_Producto = '0000000057' AND Tl_Cve_Talla + Cl_Cve_Color = '0000' DELETE Producto_Kit WHERE Pr_Cve_Producto = '0000000057' DELETE Comprador_Proveedor_Producto WHERE Pr_Cve_Producto = '0000000057' AND Cm_Cve_Comprador = '0000' AND Pv_Cve_Proveedor = '0000000000' SELECT GetDate() as Fecha *** BEGIN TRANSACION ***