SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Beta test 7.0 Format Code

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Beta test 7.0 Format Code
Author Message
sqltogo



Joined: 02 Jul 2014
Posts: 38
Country: Netherlands

Post Beta test 7.0 Format Code Reply with quote
If I enter this SQL
CREATE table [dbo].[MyTable] (
c1 INT NOT NULL,
c2 nchar(10) NULL,
c3 numeric(10,2)
);
INSERT mytable VALUES (1, '', 2 ), (3 , '' , 4), (5 , '' , 6);

And then format this code, I get this formatting
INSERT mytable
VALUES
(
1
, ''
, 2
), (3 , '' , 4), (5 , '' , 6);

I would expect the last lines also reformatted.
It is not a big issue, but it would be (to me at least) just a bit more consistent is all code is reformatted
Thu Jul 03, 2014 3:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
The pre-defined rules in SQL Assistant options do not support this kind of syntax.

Try changing the INSERT rule in SQL Assistant options and replacing

Code:
INSERT ...
  (
    ...,
    ...
  )
VALUES
  (
    ...,
    ...
  )


Code:
INSERT ...
  (
    ...,
    ...
  )
VALUES
  (
    ...,
    ...
  ),
  (
    ...,
    ...
  )



I haven't tried the above, just guessing it will do the trick
Thu Jul 03, 2014 8:15 pm View user's profile Send private message
sqltogo



Joined: 02 Jul 2014
Posts: 38
Country: Netherlands

Post Reply with quote
I tried your suggestion and it works.
Nice solution, I saved the settings so I wil not loose this.
It also gave me the way to try when I encounter similar issues when formatting is not exactly what I like.
Thanks.
Fri Jul 04, 2014 3:21 pm 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.