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

Format SQL: aligning comments

When I use the Format SQL command, it works great on the code. But in general, I want to align comments along with the code. E.g., if a statement would be tabbed in, I want the comment above it to be tabbed in also. Is there a way to accomplish this?
hobbsenigma
0

Comments

7 comments

  • Anu D
    Thanks for your post.

    Can you please explain the requirement with example?
    Anu D
    0
  • hobbsenigma
    This is what I want (comments treated as code for indent purposes):
            
                    -- comment
    	             -- comment		
    
                    if (@adjustment_type <> 1) 
                        begin				
    
    	  	                --  comment
    
                            exec AP_Item_Burden_Bill                             
    
                        end				
    

    but this is what I get (comments untouched, left wherever they happened to be):
         -- comment  
    	  -- comment		
    
                    if (@adjustment_type <> 1) 
                        begin				
    
    	  	  --  comment
    
                            exec AP_Item_Burden_Bill                             
    
                        end				
    
    hobbsenigma
    0
  • Anu D
    Many thanks for your post.

    We appreciate your feedback and hence logged this as a feature request in our internal tracking system whose tracking id is SP-3797.

    It will be reviewed by product manager and than marked for the future release.

    I will update you as soon as it is incorporated.
    Anu D
    0
  • DaveB
    Another vote for the comment alignment feature!

    -Dave
    DaveB
    0
  • akrohn
    This is crucial, otherwise the reformat feature is always followed by going through your code by hand and align all comments. Strange this got not implemented yet.
    akrohn
    0
  • willspurgeon
    +1
    willspurgeon
    0
  • jasmine78888
    Nice surprise about this shorter form. Can you tell us what it is you are talking/writing about?Has any info. about this shorter form been posted before (and i just missed it)?
    jasmine78888
    0

Add comment

Please sign in to leave a comment.