1

I want to execute query which contains unpivot in springboot application. We are using jSqlparser to validate the syntax of the query. jsqlparser version is 1.4. This version reject unpivot. Anyone can please help on this?

String sql = select ctype, cnt from temp unpivot (cnt for ctype in (ARRANGE, FAULT));
CCJSqlParserUtil.parse(sql);
Rosh
  • 730
  • 2
  • 12
  • 32
  • Well, Postgres would reject that query as well, as it doesn't have an `unpivot` operator –  Aug 27 '20 at 10:28
  • Maybe you should update JSqlParser. Meanwhile version 3.2 was released. I think this PR could fit your needs: https://github.com/JSQLParser/JSqlParser/pull/882. – wumpz Aug 27 '20 at 11:06
  • @a_horse_with_no_name query is running smoothly in postgres – Rosh Aug 28 '20 at 04:20
  • Then you are not using Postgres. What does `select version();` show you? –  Aug 28 '20 at 05:50

0 Answers0