SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Alias alignment anomaly

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Alias alignment anomaly
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Alias alignment anomaly Reply with quote
Alias alignment fails to handle some cases properly. The raw code:
Code:

SELECT
   a AS a
   ,aa AS b
   ,aaa AS c

is aligned properly and the result is:
Code:

SELECT
   a     AS a
   ,aa   AS b
   ,aaa  AS c

The following are both formatted:
Code:

SELECT
   a AS a
   ,aa AS 'b'
   ,aaa AS [c]

SELECT
   @a AS a
   ,@aa AS b
   ,@aaa AS c

with their respective results seen as below, though there are some disturbing differences. The first one is aligned on keyword 'AS' while the second one is aligned on the alias itself.
Code:

SELECT
   a     AS a
   ,aa   AS 'b'
   ,aaa  AS [c]

SELECT
   @a AS        a
   ,@aa AS      b
   ,@aaa AS     c


But when there are variables aliased with qualified alias names, they aren't aligned at all:
Code:

SELECT
   @a AS a
   ,@aa AS 'b'
   ,@aaa AS [c]

This one is unaffected after formatting..
Fri Sep 14, 2012 5:34 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Many thanks. I will submit this issue for further investigation.
Fri Sep 14, 2012 8:06 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.