select a.a1,a.a2,(case when isnull(a.a3,0)<>0 then c.c2
when isnull(a.a3,0)==0 then b.b2 end) as xxx
into abc
form a,b,c
when isnull(a.a3,0)==0 then b.b2 end) as xxx
into abc
form a,b,c
调试欢乐多
when isnull(a.a3,0)=0 then b.b2 else 0 end) as xxx
into abc
from a,b,c
when isnull(a.a3,0)=0 then b.b2 end) as xxx
into abc
from a,b,c
when isnull(a.a3,0)=0 then b.b2 end) as xxx
into abc
from a,b,c
----------------------
增加下面得条件:
where a.a1 = b.b1 and a.a2 = c.c1
when isnull(a.a3,0)=0 then b.b2 end) as xxx
into abc
from a,b,c
where a.a1 = b.b1 and a.a2 = c.c1