灵 灵成 Unregistered / Unconfirmed GUEST, unregistred user! 2009-07-09 #1 table1 userid begintime endtimetable2 userid time1我想查询时显示 begintime endtime begintime-endtime statestate是查询table2的time1是否在begintime和endtime之间,在就显示正常,不再就显示不正常各位帮个忙
table1 userid begintime endtimetable2 userid time1我想查询时显示 begintime endtime begintime-endtime statestate是查询table2的time1是否在begintime和endtime之间,在就显示正常,不再就显示不正常各位帮个忙
S szhcracker Unregistered / Unconfirmed GUEST, unregistred user! 2009-07-09 #4 Select t1.userid, t1.begintime, t1.endtime,Case When t2.time1 between t1.begintime and t1.endtime Then '正常' Else '不正常' End state From table1 t1Left Join table2 t2 On t1.userid = t2.userid你参考一下。
Select t1.userid, t1.begintime, t1.endtime,Case When t2.time1 between t1.begintime and t1.endtime Then '正常' Else '不正常' End state From table1 t1Left Join table2 t2 On t1.userid = t2.userid你参考一下。
幼 幼虫2004 Unregistered / Unconfirmed GUEST, unregistred user! 2009-07-10 #5 学习了并留下我的足迹:::::::::::::::::::::::::::::::::