sqlnotebook icon indicating copy to clipboard operation
sqlnotebook copied to clipboard

sqlite sql CTE function failure

Open happydentist opened this issue 2 years ago • 2 comments

Nice for version 1.1.0 which includes the load_extension support. I try it and the result well Another bug while try the window function. Add the script with window function And it show "Not a statement. 2022-03-09_103913 " I try with DB Browser for SQLite and the execution of the sql statement is OK. What is the problem of sqlnotebook, cause the CTE function is native within sqlite?

happydentist avatar Mar 09 '22 02:03 happydentist

Hi @happydentist, I believe it is having a problem with the CTE name "temp". Try a different name for the CTE. I will look into fixing SQL Notebook's parser; I know it fails to parse some identifiers that are also reserved keywords, but that SQLite accepts.

electroly avatar Mar 09 '22 03:03 electroly

You are right! When I rename CTE name to "temp1", it works. So SQL Notebook's parser may be changed ! Thanks !

happydentist avatar Mar 09 '22 05:03 happydentist