select distinct
id_itemdtl.id_l2code_l2,
l2_level2.l2_desc
from
id_itemdtl,
l2_level2if @lc_type=0
begin
create table #ItemQuery1
(shi_slcode_sl varchar(5),
sl_name varchar(20),
shi_sku varchar(30))
insert into #itemquery1
select shi_slcode_sl,sl_name,shi_sku
from shi_shoplocainv,sl_stocklcca,id_itemdtl
select id_sku,shi_slcode_sl,sl_name,
id_itemdtl.id_l2code_l2,
id_itemdtl.id_l3code_l3,
id_itemdtl.id_l4code_l4
into #tmp11
from id_itemdtl left join
#ItemQuery1 on id_sku =shi_sku
where id_itcode_it=@it_code
select id_sku,shi_slcode_sl,sl_name,
ip_pricea,ip_priceb,ip_promoprc,
ip_probdate,ip_proedate,
id_l2code_l2,
id_l3code_l3,
id_l4code_l4
into #tmp21
from #tmp11 ,
ip_itemprc
where
ip_lccode_lc=@def_stock
and id_sku *=ip_sku
select shi_slcode_sl,sl_name,
ip_pricea,ip_priceb,ip_promoprc,
ip_probdate,ip_proedate,
ivs_nowstoreqty,ivs_onorderqty,
id_l2code_l2,
id_l3code_l3,
id_l4code_l4
from #tmp21 ,
ivs_inventory_shop
where
ivs_lccode_lc=@lc_code
and id_sku *=ivs_sku
order by id_l2code_l2,
id_l4code_l4,
id_l3code_l3
end
SELECT
ib_itembarcode.ib_barcode,ib_sku
FROM
ib_itembarcode,
id_itemdtl
ORDER BY
id_itemdtl.id_l2code_l2,
id_itemdtl.id_l4code_l4,
id_itemdtl.id_l3code_l3如上是一个存储过程中的一段,以前用rdo执行 现在要改为ado , 以前用 If if RS.MoreResults Then 现在改为set rs=rs.nextrecordset if not rs is nothing then 就提不出来数据了。为什么怎么解决。
id_itemdtl.id_l2code_l2,
l2_level2.l2_desc
from
id_itemdtl,
l2_level2if @lc_type=0
begin
create table #ItemQuery1
(shi_slcode_sl varchar(5),
sl_name varchar(20),
shi_sku varchar(30))
insert into #itemquery1
select shi_slcode_sl,sl_name,shi_sku
from shi_shoplocainv,sl_stocklcca,id_itemdtl
select id_sku,shi_slcode_sl,sl_name,
id_itemdtl.id_l2code_l2,
id_itemdtl.id_l3code_l3,
id_itemdtl.id_l4code_l4
into #tmp11
from id_itemdtl left join
#ItemQuery1 on id_sku =shi_sku
where id_itcode_it=@it_code
select id_sku,shi_slcode_sl,sl_name,
ip_pricea,ip_priceb,ip_promoprc,
ip_probdate,ip_proedate,
id_l2code_l2,
id_l3code_l3,
id_l4code_l4
into #tmp21
from #tmp11 ,
ip_itemprc
where
ip_lccode_lc=@def_stock
and id_sku *=ip_sku
select shi_slcode_sl,sl_name,
ip_pricea,ip_priceb,ip_promoprc,
ip_probdate,ip_proedate,
ivs_nowstoreqty,ivs_onorderqty,
id_l2code_l2,
id_l3code_l3,
id_l4code_l4
from #tmp21 ,
ivs_inventory_shop
where
ivs_lccode_lc=@lc_code
and id_sku *=ivs_sku
order by id_l2code_l2,
id_l4code_l4,
id_l3code_l3
end
SELECT
ib_itembarcode.ib_barcode,ib_sku
FROM
ib_itembarcode,
id_itemdtl
ORDER BY
id_itemdtl.id_l2code_l2,
id_itemdtl.id_l4code_l4,
id_itemdtl.id_l3code_l3如上是一个存储过程中的一段,以前用rdo执行 现在要改为ado , 以前用 If if RS.MoreResults Then 现在改为set rs=rs.nextrecordset if not rs is nothing then 就提不出来数据了。为什么怎么解决。
改为if not rs.eof then试试