2 Comments

  1. Unknown's avatar

    Hi
    I’m using TSql140Parser (SQL 2017)

    I have a question about this expression:
    mergeStatement.MergeSpecification.TableAlias.Value

    The alias exists in the merge statement, but is not returned. or not found. That only happens at the target.

    In the USING area, the alias is correctly returned by all table references.

    / * Here the TSQL statement for a simple merge statement * /
    MERGE dbo.Table_1 AS t
    USING dbo.Table_3 AS s
    ON t.ID = s.ID
    AND t.feld1 = s.feld1
    WHEN MATCHED
    THEN UPDATE SET t.Date = CONVERT (VARCHAR (50), GETDATE ());

    The target table obviously has the alias “t” but is not output.

    Can you explain why Or what do I have to do to get the alias?

    Like

    Reply

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.