Issue with window functions inside CTE

28 views
Skip to first unread message

Андрій Мельник

unread,
Aug 13, 2020, 8:27:40 AM8/13/20
to H2 Database
Hello guys!
I've encountered really strange error with usage of window functions inside CTE. When i include window function field into CTE and OVER() clause is empty it works correctly, but when I try to add ORDER BY/PARTITION BY inside  the OVER() clause i'm encountering following error : '[42000][42000] Syntax error in SQL statement "WITH statement supports only SELECT, TABLE, VALUES, CREATE TABLE, INSERT, UPDATE, MERGE or DELETE statements" ' 
One clarification : when i run statements using windows functions with PARTITION BY\ORDER BY parts not inside CTE it works well.
Reply all
Reply to author
Forward
0 new messages