How can we help you today? How can we help you today?

SQL Prompt v7.0.0.41 merge $action

Hello,

It seems that SQL Prompt is placing brackets around a merge statement's $action and thus rendering it problematic.
Below when I do a ctrl-k-y (format sql) it slaps brackets around the $action.
        WHEN NOT MATCHED BY SOURCE AND ([FileListing].[StoreNum] = @Store
                                        AND [FileListing].[BusinessDate] BETWEEN @From AND @Thru
                                       ) THEN
            DELETE
        OUTPUT
            $action AS [Action],
            [Deleted].[FileListingID],
            [Deleted].[StoreNum],
            [Deleted].[BusinessDate],
            [Deleted].[ProductionFileID],
            [Deleted].[Bytes] AS [OriginalBytes],
            [Source].[Bytes] AS [NewBytes],
            [Deleted].[Created] AS [OldCreated],
            [Source].[Created] AS [NewCreated],
            [Deleted].[Modified] AS [OldModified],
            [Source].[Modified] AS [NewModified]

	) AS [Merger]
            WHERE   [Action] <> 'INSERT';


Best,

John
jsreynolds1
0

Comments

3 comments

  • Ali D
    Hi John

    Thanks for raising this, we can reproduce it so we’ll start working on a fix now.
    You can work around this temporarily by going into SQL Prompt > Options > Format > Actions and unticking “Add/remove square bracketsâ€.

    Thanks
    Ali
    Ali D
    0
  • Ali D
    Hi

    We think we've got a fix for this issue in this private build, please could you give it a try and let us know how you get on.

    Thanks
    Ali
    Ali D
    0
  • jsreynolds1
    I can confirm that the new build does not place brackets around $action.

    Thanks,

    John
    jsreynolds1
    0

Add comment

Please sign in to leave a comment.