首页 新闻 会员 周边 捐助

怎样将这条SQL写正确

-1
[已解决问题] 解决于 2011-10-07 10:20


select tempTable.maxMinute,tempTable.updateBy,tempTable.totalTime,tempTable.pages, tempTable.totalTime/tempTable.pages from
(
max(programEndTime - assignTaskTime) as maxMinute,
min(programEndTime - assignTaskTime) as minMinute ,
select
tb_Task.updateBy,sum(datediff(minute,assignTaskTime, programEndTime))as totaltime,sum(testTable.numColumn) as pages
from tb_task left join
(select taskID,case ISNUMERIC(pages) when 1 then cast(pages as int) end as numColumn from tb_TypesetYellowForm ) testTable
on tb_Task.taskID=testTable.taskID group by tb_Task.updateBy) as tempTable

Emilyer的主页 Emilyer | 初学一级 | 园豆:171
提问于:2011-09-15 16:24
< >
分享
最佳答案
0

select要放前面 

SELECT
max(programEndTime - assignTaskTime) as maxMinute,
min(programEndTime - assignTaskTime) as minMinute ,
码尔代夫iimax | 老鸟四级 |园豆:3138 | 2011-09-15 17:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册