Comment Formatting

scotthibbsscotthibbs Posts: 18
edited August 1, 2017 12:49PM in SQL Refactor Previous Versions
Looked in forum for similiar issue...did not find any. The Layout SQL function does not seem to handle comments effectively...such as:
IF @hr = 0 
             -- Note that ExceptionStatus is set to 2.  This is a flag to the message processor
             -- that this is a Work Status event.  It is NOT the actual exception status.
                    EXEC @hr = master..sp_OAMethod @objptr, 'SendTrigger',
                        @return OUT,
                        @TriggerText = @exceptionwoqueuetriggertext,
                        @ExceptionId = @exceptid, @PID = @newupdatepid,
                        @ExceptionStatus = 2, @DBName = @db, @Server = @server,
                        @DeliveryQueueName = @exceptionwoqueuename,
                        @DeliveryQueueLabel = @exceptionwoqueuelabel
Note that comments do not line up.

Tried reformatting a second effect.

Is there an option to better handle comments?


  • Submission of message removed indents.

    In refactored code, the comments hang off to the left by about 10 spaces.

    It seems that comments are not move to line up with the next code statement.
  • Message posted a while reponse
  • JonathanWattsJonathanWatts Posts: 418
    edited July 16, 2007 5:51AM
    Hi there,

    Very sorry about the lack of response, no excuses really, we should have spotted it. SQL Refactor ignores comments for the most part at the moment. Aligning comments in the Layout SQL feature is one of the more common requests we receive about SQL Refactor and therefore addressing this issue something we would like to do in future releases of SQL Refactor.


    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • Thank you for the reply.

    Formatting the comments would make the product really valuable.

    Hopefully thisd ends up on the new feature list soon........
Sign In or Register to comment.