请问下面这句如何修改,(differs<0)这个地方错? Select table1.id,table1.parts,table1.类别,table1.lowlimit,table1.highlimit,sum(table2.insums)-sum(table2.outsums)-(table1.lowlimit) as differs from table1 join table2 on table1.parts = table2.parts where (table2.datet>=(select top 1 table2.datet from table2 where table2.comnt='abc' order by table2.datet desc) and (differs<0)) group by table1.parts,table1.类别,table1.lowlimit,table1.highlimit,table1.id order by differs asc
有问题的地方我用红色表示(请教怎么改红色的地方,使之正确): Select table1.id,table1.parts,table1.类别,table1.lowlimit,table1.highlimit,sum(table2.insums)-sum(table2.outsums)-(table1.lowlimit) as differs from table1 join table2 on table1.parts = table2.parts where (table2.datet>=(select top 1 table2.datet from table2 where table2.comnt='abc' order by table2.datet desc) and (differs<0))) group by table1.parts,table1.类别,table1.lowlimit,table1.highlimit,table1.id order by differs asc
----------------------------------------------
-