SQL APPEND 时为找到FROM关键字 5

sql.Append("SELECT")sql.Append("E.EMP_NAMEAS姓名,")sql.Append("E.EMP_LBAS人员类别,")sql.App... sql.Append("SELECT")
sql.Append(" E.EMP_NAME AS 姓名,")
sql.Append(" E.EMP_LB AS 人员类别,")
sql.Append(" D.BM_NAME AS 部门,")
sql.Append(" K.WORK AS 岗位,")
sql.Append(" K.ZW AS 职务,")
sql.Append(" K.CLASS_TIME AS 课时标准,")
sql.Append(" K.RATED_P_ONE AS 一类额定,")
sql.Append(" YL.Z AS 一类业绩,")
sql.Append(" K.RATED_P_CONSTRUS AS 建设额定,")
sql.Append(" JS.X AS 建设业绩,")
sql.Append(" K.RATED_P_SCI AS 科研额定,")
sql.Append(" KY.C AS 科研业绩,")
sql.Append(" G.V AS 管理业绩,")
sql.Append(" EL.B AS 二类酬金")
sql.Append("FROM EMP AS E,EMP_INFO AS D,KIND_EMP AS K,")
sql.Append(" (SELECT SUM(XSTJ) AS Z FROM FIRST1 WHERE EMPNO=:EMPNO AND SCDATE=:SCDATE) AS YL,")
sql.Append(" (SELECT SUM(JCYJ) AS X FROM KY_Z WHERE EMPNO=:EMPNO AND JN=:SCDATE) AS JS,")
sql.Append(" (SELECT SUM(DF) AS C FROM Y WHERE EMPNO=:EMPNO AND DJND=:SCDATE) AS KY,")
sql.Append(" (SELECT SUM(FZ) AS V FROM GL WHERE EMPNO=:EMPNO AND ND=:SCDATE) AS G,")
sql.Append(" (SELECT SUM (CJ) AS B FROM E WHERE EMPNO=:EMPNO AND ND=:SCDATE) AS EL")
sql.Append("WHERE E.EMP_NO=:EMPNO ")
sql.Append("AND E.EMP_BM=D.BM_NO(+)")
sql.Append("AND E.EMP_LB=K.EMP_K(+)")
不能在里面使用嵌套么?
展开
 我来答
lh8710
2012-05-07
知道答主
回答量:26
采纳率:0%
帮助的人:19.7万
展开全部
sql.Append(" EL.B AS 二类酬金")
sql.Append("FROM EMP AS E,EMP_INFO AS D,KIND_EMP AS K,")

sql.Append(" (SELECT SUM (CJ) AS B FROM E WHERE EMPNO=:EMPNO AND ND=:SCDATE) AS EL")
sql.Append("WHERE E.EMP_NO=:EMPNO ")
FORM 和 WHERE 前 加个 空格试试
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式