SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Formatting CREATE TABLE statements

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Formatting CREATE TABLE statements
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 1401

Post Formatting CREATE TABLE statements Reply with quote
Is there a way to format CREATE TABLE statements to get the following structure?
Code:

CREATE TABLE ...
(
   ...
   ,...
   ,... AS   
      CASE ...
         WHEN   ...    THEN    ...
         ELSE    ...
      END
)


I tried by modifying formatting rules for both CREATE TABLE and CASE, even created a new one for AS CASE but I just could not achieve the desired result. The CASE part is always ruined somehow. Is it possible at all?

By the way, when declaring a table variable, datatypes are not aligned the way they are for CREATE TABLE. Is there a separate switch for that or is that function only working for CREATE TABLE statements?
Thu Aug 23, 2012 8:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6509

Post Reply with quote
I've tried different options too and so far failed to get good results. Any advanced expression within the CREATE TABLE command makes results of formatting looking bad.
I will continue experimenting, if I find any good solution, I will post it here
Thu Aug 23, 2012 6:51 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 1401

Post Reply with quote
Thank you very much, I'll do the same. Any hints on table variable declaration and datatype alignment?
Fri Aug 24, 2012 3:28 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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
Design by Freestyle XL / Flowers Online.