首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

请教这个多级查询的niner语句如何就错了呢

2012-02-19 
请问这个多级查询的niner语句怎么就错了呢?sql:selecta.strWorkerCodeas员工编号,a.strWorkerNameas员工名

请问这个多级查询的niner语句怎么就错了呢?
sql:

select   a.strWorkerCode   as   员工编号,a.strWorkerName   as   员工名称,b.strDepartmentName   as   部门编号,
c.strBanZuName   as   员工班组名   from   tabWorker   a   INNER   JOIN   tabDepartment   b   on   a.idDepartmentCode   =   b.idDepartmentCode,INNER   JOIN   tabBanZu   c   on   a.strBanZuCode   =   c.strBanZuCode


提示错误:

在关键字   'INNER '   附近有语法错误。


[解决办法]
select a.strWorkerCode as 员工编号,a.strWorkerName as 员工名称,b.strDepartmentName as 部门编号,
c.strBanZuName as 员工班组名 from tabWorker a INNER JOIN tabDepartment b on a.idDepartmentCode = b.idDepartmentCode INNER JOIN tabBanZu c on a.strBanZuCode = c.strBanZuCode

多了,号
[解决办法]
select a.strWorkerCode as 员工编号,a.strWorkerName as 员工名称,b.strDepartmentName as 部门编号,
c.strBanZuName as 员工班组名 from tabWorker a
INNER JOIN tabDepartment b on a.idDepartmentCode = b.idDepartmentCode
INNER JOIN tabBanZu c on a.strBaiZuCode = c.strBanZuCode

热点排行