隨筆-295  評論-26  文章-1  trackbacks-0

          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



          大盤預測 國富論
          posted on 2007-07-27 13:44 華夢行 閱讀(105) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 镇江市| 轮台县| 广灵县| 平遥县| 曲水县| 弋阳县| 汤阴县| 水富县| 鄂托克前旗| 靖宇县| 德化县| 平山县| 叶城县| 武威市| 横山县| 梓潼县| 永川市| 长泰县| 克东县| 于田县| 榕江县| 巩义市| 平顺县| 南宁市| 陈巴尔虎旗| 富蕴县| 温州市| 昭平县| 乌鲁木齐市| 常德市| 文水县| 岑溪市| 斗六市| 巴林左旗| 仪陇县| 泸定县| 永顺县| 木里| 尼勒克县| 临汾市| 左云县|