SELECT     right('00000'+cast(dbo.ApexCoreUser.apexId as varchar(10)),5) as dbo.ApexCoreUser.apexId from jwc_view2

解决方案 »

  1.   

    SELECT     right('00000'+cast(dbo.ApexCoreUser.apexId as varchar(10)),5) as dbo.ApexCoreUser.apexId from jwc_view2as是给该列起别名
    肯定不能用dbo.ApexCoreUser.apexId
    SELECT     right('00000'+cast(dbo.ApexCoreUser.apexId as varchar(10)),5) as apexId from jwc_view2
    这样试试?
      

  2.   

    ApexCoreUser这个表名要出现在from中
      

  3.   

    SELECT     right('00000'+cast(dbo.ApexCoreUser.apexId as varchar(10)),5) apexId from jwc_view2这样也是可以的。。
    主要就是你对as的理解不够深