SQL 在“选择”处丢失 EOF 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39699322/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 04:53:32  来源:igfitidea点击:

ERROR missing EOF at 'select'

sqlselectsyntax-erroreof

提问by Mel Pereira

Why do I get this error? I'm trying to do queries and for this i need of several selects from different tables, without any combination, but I'm getting this error and I don't known why.

为什么我会收到这个错误?我正在尝试进行查询,为此我需要从不同的表中进行多次选择,没有任何组合,但我收到此错误,我不知道为什么。

Syntax error(s) [missing EOF at 'select']

语法错误 ['select' 处缺少 EOF]

Code:

代码:

select 
d.tdok typ,
d.nr numer,
d.symbmg symbol,
d.data dataDok,
d.dokumwe dokumWe,
d.datawe datawe,
d.idkntrh idKth,
d.kwotadok kwotadok,
d.kwotavat,
k.nazwa1 nazwa1,
k.nazwa2 nazwa2
from dokum0 d
join kontrahent0 k on d.idkntrh=k.idkntrh
select t.kwota_n kwota_n 
    from dokumterm t 
    where t.dokum_id = id_dokum;
select p.id_pozdok0 AS settledCount
    from pozdok p   
    where p.dokum_id = id_dokum;
select p.id_pozdok0 AS posCount 
    from pozdok p 
    where p.dokum_id=id_dokum;
select t.kupspr kupspr  
    from sltdok t 
    where t.tdok=tdok;

Can anyone help me?

谁能帮我?

回答by T.Z.

You dont have semicolon (;) after end of first select... So this:

在第一次选择结束后你没有分号(;)......所以这个:

join kontrahent0 k on d.idkntrh=k.idkntrh

should be:

应该:

join kontrahent0 k on d.idkntrh=k.idkntrh;