缺少右括号

时间:2012-03-08 18:51:17

标签: sql

我刚开始使用SQL,当我尝试在下面运行此代码时,显示错误“缺少右括号”

SELECT a.author
FROM DLESSA.DBLP_AUTHOR a
WHERE a.authorId IN
(SELECT ea.authorId
FROM DLESSA.DBLP_ENTITY_ARTICLE ea
WHERE ea.entityId IN
(SELECT ea.entityId     
FROM DBLP_ENTITY_ARTICLE ea JOIN DBLP_ENTITY_AUTHOR ea1 ON    ea1.entityId=ea.entityId    ea1 JOIN DLESSA.DBLP_AUTHOR a ON a.authorId=ea1.authorId ea
WHERE ea.Author LIKE 'Tongs%'));

有人能告诉我我的错误在哪里吗?数百万的谢谢!

1 个答案:

答案 0 :(得分:2)

格式化显示原因:

SELECT a.author
FROM DLESSA.DBLP_AUTHOR a
WHERE a.authorId IN
    ( SELECT ea.authorId
      FROM DLESSA.DBLP_ENTITY_ARTICLE ea
      WHERE ea.entityId IN
          ( SELECT ea.entityId     
            FROM DBLP_ENTITY_ARTICLE ea            
              JOIN DBLP_ENTITY_AUTHOR ea1 
                ON    ea1.entityId=ea.entityId    ea1     ---  aliases?
              JOIN DLESSA.DBLP_AUTHOR a 
                ON a.authorId=ea1.authorId ea             --- here?
            WHERE ea.Author LIKE 'Tongs%'
          )
     );