日期:2014-05-18 浏览次数:20607 次
declare YB1 CURSOR FOR select count(tjs6600),tjs6605,convert(varchar(100),@temp,23) from tjs66 LEFT OUTER JOIN TRS14 ON TRS1400=TJS6605 left outer join tjs13 on tjs1300=tjs6602 where ( @temp<tjs6604 and tjs6613<dateadd(dd,1,@temp) and tjs6613 is not null ) or ( @temp<tjs6604 and tjs6613 is null and tjs1319='G' and tjs6614<>6 ) or ( tjs6604<@temp and tjs6613<dateadd(dd,1,@temp) and tjs6612 is not null) or ( tjs6604<@temp and tjs6613 is null and tjs1319='G' and tjs6614<>6 ) group by tjs6605,convert(varchar(100),@temp,23) ----问题在这