04-01-2020, 11:21 AM
Te puedo pasar 2 scripts para borrar albaranes de compra del 2017 y anteriores sin alterar el stock, ejecutalos uno a uno en SISTEMA->MANTENIMIENTO->Pestaña CONSOLA DB:
DELETE FROM alb_comg WHERE id_albaran IN (SELECT id_albaran FROM albaran WHERE fecha_albaran <= '2017-12-31');
DELETE FROM albaran WHERE fecha_albaran <= '2017-12-31';
Ya me dices.
DELETE FROM alb_comg WHERE id_albaran IN (SELECT id_albaran FROM albaran WHERE fecha_albaran <= '2017-12-31');
DELETE FROM albaran WHERE fecha_albaran <= '2017-12-31';
Ya me dices.