SQL语句,提示错误问题
664次浏览
编辑于2017年03月16日 15:10:24
这个语句在查询分析器里面测试可以,但是在直接SQL里面报错,说标点符号错误,请老师帮看看,谢谢。
select
ROW_NUMBER() over(PARTITION by substring(t4.FDESCRIPTION,1,5) order by t4.FDESCRIPTION,sum(t1.F_SHJ_GXDF)desc) as 排名,
t3.FNAME as 名字,
sum(t1.F_SHJ_GXDF) as 各项得分,
t4.FDESCRIPTION as 考核体
from SHJ_t_Cust_Entry100021 t1
join SHJ_t_Cust_Entry100020 t2 on t1.fid=t2.fid
join t_sec_user t3 on t3.FUSERID=t2.FCREATORID
join T_SEC_USER_L t4 on t4.FUSERID=t3.FUSERID
where (t2.F_SHJ_DATETIME>='#RKHDate#'and t2.F_SHJ_DATETIME<='#RKHEndDate#')
and t3.FFORBIDSTATUS='A'
and t3.fname='#KHRY#'
group by t3.FNAME,t4.FDESCRIPTION
select
ROW_NUMBER() over(PARTITION by substring(t4.FDESCRIPTION,1,5) order by t4.FDESCRIPTION,sum(t1.F_SHJ_GXDF)desc) as 排名,
t3.FNAME as 名字,
sum(t1.F_SHJ_GXDF) as 各项得分,
t4.FDESCRIPTION as 考核体
from SHJ_t_Cust_Entry100021 t1
join SHJ_t_Cust_Entry100020 t2 on t1.fid=t2.fid
join t_sec_user t3 on t3.FUSERID=t2.FCREATORID
join T_SEC_USER_L t4 on t4.FUSERID=t3.FUSERID
where (t2.F_SHJ_DATETIME>='#RKHDate#'and t2.F_SHJ_DATETIME<='#RKHEndDate#')
and t3.FFORBIDSTATUS='A'
and t3.fname='#KHRY#'
group by t3.FNAME,t4.FDESCRIPTION
1.png(69.20KB)
推荐阅读