How can we improve SQL Prompt?

Disable SQL Prompt on certain blocks of code

Add a functionality of disabling SQL Prompt auto-formatting feature for blocks of code. Use SQL comments for 100% sql compatibility. Example:

SELECT 1, 2, 3
--<SQLPROPMT disable>
select 4, 5, 6
--</SQLPROPMT>
select 7,8,9

in the code above, the first and third statements would be auto-formatted but not the second one.

It would be especially useful for very long scripts where a single formatting template is not an option.

76 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Piotr LipskiPiotr Lipski shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Anonymous shared a merged idea: to have a begin tag and an end tag in between which SQL Prompt leaves the code untouched  ·   · 
    Mark AndersonMark Anderson shared a merged idea: Add NOFORMAT Comment  ·   · 

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • JDS44JDS44 commented  ·   ·  Flag as inappropriate

        should it use the multi-line comment instead? /*<SQLPROMT disable>*/

      • david rawheiserdavid rawheiser commented  ·   ·  Flag as inappropriate

        I would like to vote this up if possible - Sometimes you have bulk inserts that shouldn't be wrapped or complex SQL that is easier to understand if formatted in a logical and not syntactical manner. The Java format processor uses a tag in a comment @formatter:off and then @formatter:on.

      • DaverDaver commented  ·   ·  Flag as inappropriate

        Good idea. I'd like to also suggest that we would disable Code Suggestions for an entire single file. I want it on for the other pages as I research or refactor the page that contains huge amounts of dynamic SQL. I want the code suggestions to work on the other pages.

      Feedback and Knowledge Base