##要货单 truncate ipos_zdjrd; truncate ipos_zdjrdmi; truncate ipos_zdjrdmx; ##进货单 truncate ipos_zdjhd; truncate ipos_zdjhdmi; truncate ipos_zdjhdmx; truncate ipos_zdjhdmi2; truncate ipos_zdjhdmx2; ##进货通知单 truncate ipos_jhtzd; truncate ipos_jhtzdmi; truncate ipos_jhtzdmx; ##退货单 truncate ipos_zdthd; truncate ipos_zdthdmi; truncate ipos_zdthdmx; ##退货通知单 truncate ipos_thtzd; truncate ipos_thtzdmi; truncate ipos_thtzdmx; ##退货申请单 truncate ipos_zdsqd; truncate ipos_zdsqdmi; truncate ipos_zdsqdmx; ##调整单 truncate ipos_zdtzd; truncate ipos_zdtzdmi; truncate ipos_zdtzdmx; ##移库单 truncate ipos_zdykd; truncate ipos_zdykdmi; truncate ipos_zdykdmx; ##小票单 delete from ipos_qtlsd where yyrq<=UNIX_TIMESTAMP('2011-12-31'); delete from ipos_qtlsdmx where pid not in(select Id from ipos_qtlsd); delete from ipos_qtlsdjs where pid not in(select Id from ipos_qtlsd); ##零售销货单 delete from ipos_lsxhd where rq<=UNIX_TIMESTAMP('2011-12-31'); delete from ipos_lsxhdmx where pid not in(select Id from ipos_lsxhd); delete from ipos_lsxhdjs where pid not in(select Id from ipos_lsxhd); ##零售销货单 delete from ipos_lsthd where rq<=UNIX_TIMESTAMP('2011-12-31'); delete from ipos_lsthdmx where pid not in(select Id from ipos_lsthd); delete from ipos_lsthdjs where pid not in(select Id from ipos_lsthd); ##商品库存表 truncate ipos_spkcb; ##盘点单 truncate ipos_zdpdd; truncate ipos_zdpddmi; truncate ipos_zdpddmx; ##盘点任务单 truncate ipos_pdrwd; truncate ipos_pdrwdmi; truncate ipos_pdrwdmx; ##盘点计划单 truncate ipos_pdjhd; truncate ipos_pdjhdmi; truncate ipos_pdjhdmx; ##日结单 truncate ipos_rjtjb; truncate ipos_rjtmp; truncate ipos_rjtmp_0; truncate ipos_rjtmp_1; truncate ipos_rjtmp_2; truncate ipos_rjtmp_3; truncate ipos_rjtmp_4; truncate ipos_rjtmp_5; truncate ipos_rjtmp_6; truncate ipos_rjtmp_7; truncate ipos_rjtmp_8; truncate ipos_rjtmp_9;