"from tSalesOrderSubDtl sosd left join V_GetminAgentGoodsPic agp on agp.nAgentID = sosd.nAgentID and agp.nGoodsID = sosd.nGoodsID and agp.sPicTypeID = 1"+
"where sosd.sSubOrderID = ? ";
" nOldSaleQty = case when sosd.nOrderRate > 1 then sosd.nOldSaleQty / sosd.nOrderRate else sosd.nOldSaleQty end, "+
" nOldSalePrice = case when sosd.nOrderRate > 1 then sosd.nOldSalePrice*sosd.nOrderRate else sosd.nOldSalePrice end, "+