Red Gate forums :: View topic - Format SQL: aligning comments
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

Format SQL: aligning comments

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
hobbsenigma



Joined: 06 Feb 2011
Posts: 3

PostPosted: Sun Feb 06, 2011 5:01 am    Post subject: Format SQL: aligning comments Reply with quote

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?
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 662
Location: Cambridge

PostPosted: Mon Feb 07, 2011 12:19 pm    Post subject: Reply with quote

Thanks for your post.

Can you please explain the requirement with example?
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
hobbsenigma



Joined: 06 Feb 2011
Posts: 3

PostPosted: Tue Feb 08, 2011 4:44 pm    Post subject: Reply with quote

This is what I want (comments treated as code for indent purposes):
Code:

       
                -- 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):

Code:

     -- comment 
     -- comment      

                if (@adjustment_type <> 1)
                    begin            

          --  comment

                        exec AP_Item_Burden_Bill                             

                    end            
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 662
Location: Cambridge

PostPosted: Thu Feb 10, 2011 2:02 pm    Post subject: Reply with quote

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.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
DaveB



Joined: 27 Mar 2011
Posts: 8

PostPosted: Thu Mar 31, 2011 1:30 pm    Post subject: Reply with quote

Another vote for the comment alignment feature!

-Dave
Back to top
View user's profile Send private message
akrohn



Joined: 28 Jul 2008
Posts: 5

PostPosted: Mon Apr 04, 2011 8:03 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
willspurgeon



Joined: 16 Jan 2009
Posts: 5

PostPosted: Mon Jul 01, 2013 5:04 pm    Post subject: +1 Reply with quote

+1
Back to top
View user's profile Send private message
jasmine78888



Joined: 03 Jul 2013
Posts: 1

PostPosted: Wed Jul 03, 2013 1:33 pm    Post subject: Nice Reply with quote

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)?
_________________
Jasmine
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group