我想将这个查询从MySQL转换为MSSQL,请你协助吗?谢谢你的回复,
java filename
答案 0 :(得分:0)
这是你在找什么?
CREATE VIEW view_taksitmus
AS
select t.taksitid AS taksitid
,t.policeid AS policeid
,t.vade AS vade
,t.tutar AS tutar
,CASE WHEN sum(tm.tutar) IS NULL THEN 0 ELSE sum(tm.tutar) END AS odenen
,CASE WHEN sum(tm.tutar) IS NULL THEN t.tutar ELSE (t.tutar - sum(tm.tutar)) END AS kalan
,p.policeno AS policeno
,p.zeyilno AS zeyilno
,p.yenilemeno AS yenilemeno
,p.plaka AS plaka
,p.doviz AS doviz
,p.kur AS kur
from ins_taksitmus t
left join ins_takmak tm on t.taksitid = tm.taksitid
left join view_police p ont.policeid = p.policeid