Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: Parser
    • Labels:
      None

      Description

      OUTPUT clauses can consists of scalar expression.
      Currently, our parser throws an error when this expression starts with a column name as it incorrectly matches it to an outputColumn instead of an outputExpression.

      Following syntax cannot be parsed:

      DELETE table1 OUTPUT deleted.col2 - 2 AS scalar_output WHERE id = 2
      

      Whereas this is correctly mapped:

      DELETE table1 OUTPUT 0 + deleted.col2 - 2 AS scalar_output WHERE id = 2
      

      See:
      https://docs.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql?view=sql-server-2017

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                christophe.zurn Christophe Zurn
                Reporter:
                christophe.zurn Christophe Zurn
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: