select fd.xf_location as xf_location,fd.xf_brand as xf_brand,fd.xf_region as xf_region,fd.xf_sku as xf_sku,fd.xf_qty as xf_qty,fw.qty as qty from $srctable fd,$dsttable fw inbound_xf_tows1shmap ft where fd.xf_brand=fw.brand and fd.xf_region=fw.region and fd.xf_sku=fw.sku and fd.facility=ft.xf_wmsloc and fd.hostwhcode=xf_wmswh and fd.xf_qty!=CAST(fw.qty as unsigned);