报错:子查询注意!

SELECT @JS_ID = A.ID,
        @JSHM = A.JSHM,
        @JS_MC = A.JS_MC,
        @XY_DM = A.XY_DM,
        @RS = A.RS
    FROM(select ID,JSHM,JS_MC,XY_DM,RS
     FROM F_Get_ZYBJ_JXB_JSXX(@ID_ZYBJ_KKKC_JXB,@ID_1,@XND_Q,@XND_Z,@XNXQ)
     where JSLX_DM = @JSLX_DM
     and DXBZ >= @BJSL)AS A
    WHERE A.ID NOT IN(dbo.aa(@i,@num,@PK_JS_JG_Array))
之前没有写 “AS  A 报错,而在where语句中若要用到子查询则不需启别名。
posted @ 2011-06-07 12:45  oY_211  阅读(108)  评论(0编辑  收藏  举报