Julian Hyde created CALCITE-2244:
------------------------------------

             Summary: CTEs in DML: "WITH ... INSERT / UPDATE / DELETE / MERGE"
                 Key: CALCITE-2244
                 URL: https://issues.apache.org/jira/browse/CALCITE-2244
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


Support common-table expressions (CTEs) in DML. In other words, allow INSERT, 
UPDATE, DELETE, MERGE statements to be prefixed by a WITH clause that defines 
"temporary views".

E.g. {code}WITH TokyoEmps AS
  SELECT *
  FROM Emps
  WHERE office = 'Tokyo'
DELETE FROM Tokyo Emps{code}

The effect should be pretty much the same as if {{TokyoEmps}} were a view.

This is not standard SQL. As of SQL 2014, only a {{<query expression>}} can 
have a {{<with clause>}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to