select NVL(b.Name, ' ') AS spec, ' ' as packs,
'' as Quant,
'' as Price,
?NVL(a.feeamount,0) as amount, ' ' as cpbh,' ' as cpname, ' ' as jidw
from ITM_Documentfee a? left join
sys_datadictionary b on b.id=a.feeid????
union
select
NVL(b.Spec, ' ') AS spec,
NVL(b.field1,' ') as packs,
case Quant
?when 0 then
? ' '
?when null then
? ' '
?else
?? to_char(Quant)?
end as Quant
,
case Price
?when 0 then
? ' '
?when null then
? ' '
?else
?? to_char(Price)?
end as Price
,
? NVL(b.Amount, 0) AS amount,
c.SerialNumber as cpbh,NVL(c.EnName, ' ') AS cpname,
NVL(t.Symbol, ' ') AS jidw
from ITM_SalesCommodity b
left join CRM_Commodity c ON c.TypeID = b.CommodityTypeID
LEFT OUTER JOIN????? BSE_MeasureStyle t ON b.QuantUnitID = t.ID
select ISNULL(b.Name, ' ') AS spec, ' ' as packs,
'' as Quant,
'' as Price,
?isnull(a.feeamount,0) as amount, ' ' as cpbh,' ' as cpname, ' ' as jidw
from ITM_Documentfee a? left join
sys_datadictionary b on b.id=a.feeid????
union
select
ISNULL(b.Spec, ' ') AS spec,
isnull(b.field1,' ') as packs,
Quant =
case
?when Quant>0 then
? CAST( Quant AS varchar(20))
?else ''
end
,
Price =
case
?when Price>0 then
? CAST( Price AS varchar(20))
?else ''
end
,
? ISNULL(b.Amount, 0) AS amount,
c.SerialNumber as cpbh,ISNULL(c.EnName, ' ') AS cpname,
ISNULL(t.Symbol, ' ') AS jidw
from ITM_SalesCommodity b
left join CRM_Commodity c ON c.TypeID = b.CommodityTypeID
LEFT OUTER JOIN????? BSE_MeasureStyle t ON b.QuantUnitID = t.ID
大盤預(yù)測
國富論
posted on 2007-07-27 13:44
華夢行 閱讀(99)
評論(0) 編輯 收藏