Line Return Indentation Issue

Provides intelligent code completion for SQL Server editors.

Line Return Indentation Issue

Postby michaelfried » Thu Aug 13, 2009 1:27 am

As I am typing in a query, I have not figured out how to get the new line indentation to start at the level of indentation of the previous line in SQL Prompt 4.

For Example:

Code: Select all
SELECT a.[Column1],
            a.[Column2],
a.[Column3]


Each new line starts all the way to the left, instead of indented at the level above (SQL Prompt 3.9 worked this way --> a.[Column3] would be indented the same as a.[Column2] automatically). What settings do I change in the format area to make it work properly?

Do I have to manually choose Format SQL after I am done typing in my query everytime? That seems like extra unnecessary work (especially since the previous version did not make you do that).

Mike
michaelfried
 
Posts: 21
Joined: Tue Mar 04, 2008 8:43 pm

Postby bmsullivan » Fri Aug 14, 2009 2:49 pm

I'm experiencing the same thing. It also occurs when writing conditional statements, such as:

IF @strName IS NULL
BEGIN
SET @strName = 'Bob' -- This would have been indented in SQL Prompt 3
END

This is quite annoying after not having to deal with indentation for so long, SQL Prompt 3 did a great job of handling this.
bmsullivan
 
Posts: 1
Joined: Fri Aug 14, 2009 2:42 pm

Postby Anu Deshpande » Tue Aug 18, 2009 11:07 am

Hello Mike,

Thanks for your post Mike and apologies for the inconvenience.

I am tryng to replicate your issue but not able to.

Could you kindly send us your complete query on support@red-gate.com and I will create a call reference for you and we can carry from there?

Kindly let me know your view on this.
Last edited by Anu Deshpande on Tue Aug 18, 2009 3:54 pm, edited 1 time in total.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 737
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby Anu Deshpande » Tue Aug 18, 2009 12:22 pm

Hello bmsullivan

Thanks for your post.

Could you kindly send us the option setting which you did for SQL Prompt 3?

And also if you could let us know which way you want SQL Prompt 4 to format the above query given by you?

Above details will help us to replicate the issue and investigate further.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 737
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby michaelfried » Tue Aug 18, 2009 7:26 pm

Sent an email to RedGate Support as requested.

Mike
michaelfried
 
Posts: 21
Joined: Tue Mar 04, 2008 8:43 pm

Postby Anu Deshpande » Wed Aug 19, 2009 9:22 am

Thanks for your email.

I have replied to your email kindly let us know if that fixes the issue.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 737
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby basw » Wed Aug 19, 2009 2:56 pm

Hello,

I'm having the same issue, would you mind sharing the trick?

Thanks!

Bas
basw
 
Posts: 4
Joined: Thu May 22, 2008 10:31 am
Location: The Netherlands

Postby Anu Deshpande » Wed Aug 19, 2009 3:01 pm

Hello Bas,

Many thanks for your post.

Could you kindly change following settings:
SQL Prompt 4 --> Options --> Format --> Data Statements --> unselect option <Indent subclauses>

Let us know if this fixes the issue.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 737
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby basw » Wed Aug 19, 2009 3:13 pm

Thanks for your anwser.

It was already unchecked.
Tried to check/uncheck it, makes no difference.
basw
 
Posts: 4
Joined: Thu May 22, 2008 10:31 am
Location: The Netherlands

Postby Anu Deshpande » Wed Aug 19, 2009 3:33 pm

Thanks for the update.

Could you kindly send us screenshots of your settings on support@red-gate.com ?
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 737
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby Anu Deshpande » Wed Aug 19, 2009 3:37 pm

Hello Bas,

If you could include the link to this forum in your email will be of great help.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 737
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby Ashwinks » Wed Aug 19, 2009 4:44 pm

I am having the very same issue. I find that now the "format" section under "Options" is greyed out because I am on the "standard" version. I dont remember having any limitations, especially in the options under SQL Prompt 3.0.

The indentation at various points was extremely intuitive in 3.0, and an enormous help and not having that in 4.0 is almost very disappointing. The speed in 4.0 is fantastic, so great job on that angle !

Could you please post a public note on how to get the indentation working ?
Ashwinks
 
Posts: 3
Joined: Fri Feb 16, 2007 5:44 pm

Postby michaelfried » Wed Aug 19, 2009 7:25 pm

I tried your suggstion and it made no difference. The option was already unchecked. I tried both ways (checked and unchecked) and it still does not indent properly.

Mike
michaelfried
 
Posts: 21
Joined: Tue Mar 04, 2008 8:43 pm

Postby tanya » Thu Aug 20, 2009 12:07 pm

Hello all,

Guilty as charged :(
In the process of redesigning the options dialog, we missed retaining the default indentation behaviour for SQL Prompt v4. This is a bug and we will fix it in our next release. Until then, I am afraid we do not have any workaround unless any of you can come up with an ingenious solution :wink:
Sincere apologies for the inconvenience this has caused.

Thanks,
Tanya
Project Manager
Red Gate Software Ltd
tanya
 
Posts: 252
Joined: Mon Apr 30, 2007 8:29 pm

Postby basw » Thu Aug 20, 2009 12:25 pm

Hello Tanya,

Good to know it will be fixed.

Nice enhancements for the rest! The speed is amazing.
basw
 
Posts: 4
Joined: Thu May 22, 2008 10:31 am
Location: The Netherlands

Next

Return to SQL Prompt Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests