34,590
社区成员
发帖
与我相关
我的任务
分享
select a.id,
sl= SUM(b.sl) ,
je= SUM(b.je)
from (select ID from dbo.GetChild(id)) a join table1 b
on b.id =a.id
group by a.id
select a.id,
sl= SUM(b.sl) ,
je= SUM(b.je)
from table1 a join table1 b
on b.id in (select ID from dbo.GetChild(a.id))group By a.id
select a.id,
sl= SUM(b.sl) ,
je= SUM(b.je)
from table1 a join table1 b
on b.id in (select ID from dbo.GetChild(a.id))
group By a.id
select a.id,
sl= SUM(b.sl) ,
je= SUM(b.je)
from table1 a join table1 b
on b.id in (select ID from dbo.GetChild(a.id))
select a.id,
sl= SUM(b.sl) ,
je= SUM(b.je)
from table1 a , table1 b
where b.id in (select ID from dbo.GetChild(a.id))
group by a.id
select a.id,
sl= SUM(sl) ,
je= SUM(je)
from table1 a , table1 b
where b.id in (select ID from dbo.GetChild(a.id))
group by a.id