26-02-2018, 09:46 PM
Ok, haz una copia de seguridad antes de ejecutar el script:
delete from pack where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pack where id_complementog1 in (select id_complementog from complementog where idinterno = "T2017");
delete from tipo_comg_comg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pnotacocina where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pproveedor where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from productoimg where id in (select id_complementog from complementog where idinterno = "T2017");
delete from productoimgs where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from comg_tarifa where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pack where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from combinados where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from combinados where id_complementog1 in (select id_complementog from complementog where idinterno = "T2017");
delete from variaciones where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from almacen_complementg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from opencart_comg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from alb_comg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from inventario_complementg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from traspasos_complementog where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
update complementog set cafeteria = "N" where id_complementog = "T2017";
delete from pack where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pack where id_complementog1 in (select id_complementog from complementog where idinterno = "T2017");
delete from tipo_comg_comg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pnotacocina where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pproveedor where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from productoimg where id in (select id_complementog from complementog where idinterno = "T2017");
delete from productoimgs where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from comg_tarifa where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from pack where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from combinados where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from combinados where id_complementog1 in (select id_complementog from complementog where idinterno = "T2017");
delete from variaciones where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from almacen_complementg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from opencart_comg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from alb_comg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from inventario_complementg where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
delete from traspasos_complementog where id_complementog in (select id_complementog from complementog where idinterno = "T2017");
update complementog set cafeteria = "N" where id_complementog = "T2017";