求高手解决我库存表上的问题,问题在附件上有标识!!麻烦大家了!!顺便附上我的SQL语句,看看有无问题!!
十分感谢!!
select "期初",提单号,发票号,日期,规格,品名,型号,库位,集中报关期限,数量PCS,0 as 数量PCS3, 0 as 数量PCS2, 件数,0 as 件数3, 0 as 件数2, 净重KG,0 as 净重KG3, 0 as 净重KG2, 毛重KG,0 as 毛重KG3, 0 as 毛重KG2 from [期初$] union all select "入库",提单号,发票号,日期,规格,品名,型号,库位,集中报关期限, 0 as 数量PCS2, 数量PCS,0 as 数量PCS3, 0 as 件数2, 件数,0 as 件数3, 0 as 净重KG2, 净重KG,0 as 净重KG3, 0 as 毛重KG2, 毛重KG,0 as 毛重KG3 from [入库$] union all select "出库",提单号,发票号,日期,规格,品名,型号,库位,集中报关期限, 0 as 数量PCS3, 0 as 数量PCS2,数量PCS, 0 as 件数3, 0 as 件数2,件数, 0 as 净重KG3, 0 as 净重KG2,净重KG, 0 as 毛重KG3, 0 as 毛重KG2,毛重KG from [出库$] |