iCount int ;

vTermSql varchar2(1000);

AProductSID int;

ASaleCodeSid int;

vConditionTxt varchar2(1000);

vTermSql:='select count(1) from V_PRODUCT_FORPROMOTION where sid=:ProductSID and sale_code_sid=:SaleCodeSID '||vConditionTxt;
Execute immediate vTermSql into iCount using AProductSID,ASaleCodeSid;

vConditionTxt 是条件参数,AProductSID 是具体的SID值,ASaleCodeSid 是具体的sale_code_sid值

posted on 2011-06-23 17:46  jing_lee  阅读(149)  评论(0)    收藏  举报