摘要: select ol.item_id, ii.item_code, ii.description, ol.uom, sum(ol.order_quantity - nvl(ol.delivery_quantity, 0)) as require_quantity, --订单需求 nvl((select sum(a.primary_quantity) from inv_quantities_onhand a where a.storage_location_id in (select x.storage_location_id from inv_storage_locations_vl x whe 阅读全文
posted @ 2011-08-01 18:54 小波Ooo 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 方法一:代码1 select into 和 insert into select 两种表复制语句 2 select * into destTbl from srcTbl 3 4 insert into destTbl(fld1, fld2) select fld1, 5 from srcTbl 5 6 以上两句都是将 srcTbl 的数据插入到 destTbl,但两句又有区别的。 7 8 第一句(select into from)要求目标表(destTbl)不存在,因为在插入时会自动创建。 9 10 第二句(insert into select from)要求目标表(destTbl)存在,由于 阅读全文
posted @ 2011-08-01 18:53 小波Ooo 阅读(2308) 评论(0) 推荐(0) 编辑