我有一个查询,我把它作为数据表放在数据集中。查询运行良好,但它没有在数据表中列出任何内容,因为我无法报告。我的查询如下。. R6 R# w( |, C
SELECT * FROM SELECT timeclock.dtTimeIn,timeclock.dtTimeOut,employees.sfirstname, RANK() OVER ( ORDER BY dtTimeIn) rk1,--earliest record gets 1 RANK() OVER (ORDER BY dtTimeOut DESC) rk2 --latest record gets 1 FROM TimeClock INNER JOIN Employees ON TimeClock.lEmployeeID = Employees.lEmployeeID WHERE (dtTimeIn > dateadd(day,datediff(day,0,getdate())-1,0)) AND (dtTimeOut 当前运行查询输出: " h7 q1 q! Z' R3 ~2 i dtTimeIn dtTimeOut sfirstname rk rk22/7/2013 2:36:00PM 2/7/2013 7:52:33PM Brian 10 10 2 R5 {( }- p" ?- ^7 [% v# V % w* s- V- M( u在向导中创建表适配器时…我收到了错误的消息: * {; E t& g' yThe Wizard detected the following problems when configuring the TableAdapter:"OpenTime"etails:Generated SELECT statement.The OVER SQL construct or statement is not supportedTo add these components to your dataset,click Finish.我猜它不喜欢查询…但我不确定,除了使用 OVER除了功能,还有其他方法可以完成查询… 5 S9 C* h3 S6 M$ R p" G / Z* \- l& `, p0 A7 V g4 x解决方案: