1. 程式人生 > >sql Transact for good Sample

sql Transact for good Sample

select   *  from
(select *,case when left(a.ww,2)='po' then ('MI-'+a.ww) else a.ww end as new_ww from A) A left join B
 on A.new_ww=B.xx

select * from a left outer join b on (case when left(a.ww,2)='po' then ('MI-'+a.ww) else a.ww end)=b.xx
我都測試正常呀?是不是語法或者是欄位名寫錯了?