Red Gate forums :: View topic - Format options suggestions
Return to www.red-gate.com RSS Feed Available

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

Format options suggestions

Search in SQL Prompt 5 EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
cussuol



Joined: 25 Aug 2005
Posts: 10

PostPosted: Thu Oct 28, 2010 10:26 pm    Post subject: Format options suggestions Reply with quote

Hello friends,
I'd like to have my case commands formated like this:

Code:
SELECT
  CASE
    WHEN 1 = 1 THEN 'A'
    WHEN 1 = 2 THEN 'B'
    ELSE 'C'
  END


So, i think the better way to get this, and a lot of another formating options is to creating word lists like these:
- List of works to break the line before
- List of works to break the line after
- List of works to indent the block before
- List of works to indent the block after
- List of works to unindent the block before
- List of works to unindent the block after
.......
Back to top
View user's profile Send private message
jermy



Joined: 16 Mar 2010
Posts: 9

PostPosted: Thu Nov 11, 2010 4:38 pm    Post subject: What about the 2nd THEN? Reply with quote

I like your idea, but it can't related to a list of words, without their context.
What I mean is that for example if you define "CASE" and "WHEN" in the
Quote:
"List of works to indent the block before"
and "END" in the
Quote:
"List of works to unindent the block before"
and all above + "ELSE" in the
Quote:
"List of works to break the line before"
you will get the following code:
Code:
SELECT
   CASE
      WHEN 1 = 1 THEN 'A'
         WHEN 1 = 2 THEN 'B'
         ELSE 'C'
      END

Because the 2nd "WHEN" don't need to be indented only the first.
So maybe it should have kind of templates for block statements with macro for indent one tab/indent to list/unindent/break line/etc. like snippets.

BTW, you wrote
Quote:
"List of works..."
instead of
Quote:
"List of words..."

THNX
Jermy
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. 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