前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed a

Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed a

作者头像
IT云清
发布2021-12-06 14:30:07
4.8K0
发布2021-12-06 14:30:07
举报
文章被收录于专栏:IT云清
问题:

clickhouse查询语句抛出一下异常: e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): 具体堆栈如下:

代码语言:javascript
复制
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT count(raba.id) FROM aabbccd.test_all raba where raba.partnerCode = 'demo';
### Cause: ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 62, host: 10.58.10.10, port: 8123; Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 102 (end of query) (line 1, col 102): ;
FORMAT TabSeparatedWithNamesAndTypes.  (version 21.5.6.6 (official build))

; uncategorized SQLException; SQL state [null]; error code [62]; ClickHouse exception, code: 62, host: 10.58.10.10, port: 8123; Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 102 (end of query) (line 1, col 102): ;
FORMAT TabSeparatedWithNamesAndTypes.  (version 21.5.6.6 (official build))
; nested exception is ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 62, host: 10.58.10.10, port: 8123; Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 102 (end of query) (line 1, col 102): ;
FORMAT TabSeparatedWithNamesAndTypes.  (version 21.5.6.6 (official build))
] with root cause

java.lang.Throwable: Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 102 (end of query) (line 1, col 102): ;
FORMAT TabSeparatedWithNamesAndTypes.  (version 21.5.6.6 (official build))

	at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:54)
	at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:29)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.checkForErrorAndThrow(ClickHouseStatementImpl.java:1094)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:773)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQueryStatement(ClickHouseStatementImpl.java:271)
解决方案:

去掉sql后面的分号;字符。

很神奇。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021/08/12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 问题:
  • 解决方案:
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档