求救??
select a.id,a.sname,a.sstock, isnull((select sum(b.number) from m_stockcontent
as b where oddtype=1 and b.ddate>'2007-05-09' or b.ddate<'2008-05-10' and b.spid= a.id ),0) cg,
d.dname,a.spec,a.smanufa,a.stm,a.sremark from m_sp as a
join m_dw as d on d.id=a.dw join m_kc as s on s.spid =a.id
cg 这列出现的数据都是一样的??? 请高手指点