parsing error on delete query after a cte #852
Replies: 1 comment 1 reply
-
Support for with clauses in delete statements is missing in SQLPage. But that's not what you should be using in your case anyway. To handle hierarchical data like parent-child sprints, foreign keys with The Problem with Manual DeletesYour current approach requires recursively querying child sprints and deleting them manually. This is error-prone and complex. How Foreign Keys Work
What Happens When You Delete
Key Advantages
Important Notes
By defining proper foreign keys, you delegate hierarchical operations to the database engine, which is designed to handle them efficiently and safely. |
Beta Was this translation helpful? Give feedback.
-
SQLITE
I am using the chart component to display the sprints of a project. Some sprints are linked to a parent sprint. When I need to update/delete a parent spint I must also update/delete the child sprints. So, I am exploring recursive cte's. It works when I update the parent sprint but when I have an error I don't understand when I try to delete a parent sprint and all his children :
sql parser error: Expected: SELECT, VALUES, or a subquery in the query body, found: DELETE
As I understand the error, it seems not authorized to make directly a delete query after a CTE ? But I don't master CTE's so I am probably wrong in my query (but in sql forums it said that it is possible)
Thanks in advance for any help !
Beta Was this translation helpful? Give feedback.
All reactions