Logo SQLinForm

 

Re: matching ( ) level

[solved thumbs up] matching ( ) level
October 18, 2010 05:31PM
Is it possible to configure your utility to keep all brackets at the same indent level? Specifically I am referring to CASE statements, where it seems to want to indent the closing bracket with the final statement. For example, at present your utility formats as follows:
    (
          CASE
              WHEN TBL1.SOME_IN = 'N' AND TBL2.COL2 IS NULL
                  THEN 1.0000
              ELSE 0
          END ) AS NEW_FLD_NM,

What I'd like is for it to produce:
SELECT
    (
      CASE
        WHEN TBL1.SOME_IN = 'N'AND TBL2.COL2 IS NULL 
        	THEN 1.0000
        ELSE 0
      END
    ) AS NEW_FLD_NM
FROM
  TABLE;

So the two changes from current functionality would be:
1. Have the closing ) at the same level as the initial ( for case statements.
2. Be able to indent the contents of anything inside brackets by X spaces



Edited 3 time(s). Last edit at 01/14/2011 10:36PM by guidomarcel.
Re: matching ( ) level
October 19, 2010 05:41PM
Hi khariv,
thanks for your feedback. Your comment remembers me that already long time ago I wanted to give the case bracets more flexibility, i.e. dedicated options for the CASE brackets. i will add this to my todo-list.

Thanks
Guido
Re: matching ( ) level
October 19, 2010 05:43PM
Thanks Guido. If you could also add the ability to have line breaks and indents for items contained in brackets (#2 above),that would be great too.
Re: matching ( ) level
January 14, 2011 10:35PM
Hi,
the feature you requested is now available in the new online version.
Regards
Guido
Re: matching ( ) level
March 30, 2011 07:21PM
Is this feature available in the stand alone desktop version?

We purchased the corporate bundle and are using engine 4.8.27 and the formatting still looks like my original example with the brackets.

thanks
khariV

Edited:
Never mind - I updated the client to 4.8.34 and now I see the formatting option for CASE statements. Thank you.



Edited 1 time(s). Last edit at 03/30/2011 07:31PM by khariv.
Author:

Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 1 plus 10?
Message: