net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "SELECT" <K_SELECT>
See original GitHub issueDescribe the bug
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "SELECT" <K_SELECT>
at line 11, column 9.
Was expecting one of:
"!"
"("
"+"
"-"
"?"
"@"
"@@"
"ACTION"
"ANY"
"BYTE"
"CASCADE"
"CASE"
"CAST"
"CHANGE"
"CHAR"
"CHARACTER"
"COLUMN"
"COLUMNS"
"COMMENT"
"COMMIT"
"DESCRIBE"
"DO"
"DUPLICATE"
"ENABLE"
"END"
"EXTRACT"
"FALSE"
"FIRST"
"FN"
"FOLLOWING"
"GROUP_CONCAT"
"INDEX"
"INSERT"
"INTERVAL"
"ISNULL"
"KEY"
"LAST"
"MATERIALIZED"
"NEXTVAL"
"NO"
"NOT"
"NULL"
"NULLS"
"OPEN"
"OVER"
"PARTITION"
"PATH"
"PERCENT"
"PRECISION"
"PRIMARY"
"PRIOR"
"RANGE"
"READ"
"REPLACE"
"ROW"
"ROWS"
"SEPARATOR"
"SESSION"
"SIBLINGS"
"SIZE"
"START"
"TABLE"
"TEMP"
"TEMPORARY"
"TOP"
"TRUE"
"TRUNCATE"
"TYPE"
"UNSIGNED"
"VALUE"
"VALUES"
"XML"
"ZONE"
"{d"
"{t"
"{ts"
"~"
<K_DATETIMELITERAL>
<K_DATE_LITERAL>
<K_TIME_KEY_EXPR>
<S_CHAR_LITERAL>
<S_DOUBLE>
<S_HEX>
<S_IDENTIFIER>
<S_LONG>
<S_QUOTED_IDENTIFIER>
To Reproduce
INSERT INTO a.new_table(
stat_date
,game_id
,live_num
,insert_time
,agg_code
,platform
,channel_id
,area_id
)
VALUES (SELECT area_id
,area_id
,area_id
,area_id
,area_id
,area_id
,area_id
,area_id
FROM kudu.old_table
WHERE event_time >= date_parse('2019-10-09 05:29:00', '%Y-%m-%d %H:%i:%s')
AND event_time < date_parse('2019-10-09 05:30:00', '%Y-%m-%d %H:%i:%s')
AND game_id IN (
'1'
,'2'
)
GROUP BY area_id
,game_id);
System
- Java Version 1,8
- JSqlParser version 3.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
net.sf.jsqlparser.parser.ParseException - java - Stack Overflow
This seemed to be a dependency issue for me. This is the query I ran with the older version of the jsqlparser library:...
Read more >Caused by: net.sf.jsqlparser.parser.ParseException ... - GitHub
Describe the bug. Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "(" at line 7, column 37. To Reproduce Example SQL
Read more >Caused by: net.sf.jsqlparser.parser.ParseException ...
重点看报错信息里面的那个Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: ":" ":".
Read more >net.sf.jsqlparser.parser.ParseException java code examples
startsWith("Encountered unexpected token: \"=\" \"=\"")) { return new ParseException("unable to parse complete sql string. one reason for this is the use of ...
Read more >net.sf.jsqlparser.parser.ParseException - 博客园
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: ":" ":". at line 5, column 82. Was expecting one of:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Which database is this? Is this actually a valid SQL? I only know this version without the values keyword:
No answer?