SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[11.5.362 Pro] - Formatting INTO (SQL Server)

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[11.5.362 Pro] - Formatting INTO (SQL Server)
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2100

Post [11.5.362 Pro] - Formatting INTO (SQL Server) Reply with quote
When formatting this code
Code:

SELECT uhh.[nyomvonal_id]
,uhh.[MAX]
INTO #nyomvon_tol_ig
FROM [nyomvon_tol_ig]  AS uhh
;


using this rule for SELECT
Code:

SELECT ... AS ...
        ,... = ...
    INTO ...
    FROM ... AS ...
        ,...
        JOIN ... ON ... = ... AND ... OR ...
    WHERE ... = ...
        AND ...
        OR ...
    GROUP BY ...
        ,...
    HAVING ...
        ,...
    ORDER BY ...
        ,...;


it gets formatted like this
Code:

SELECT uhh.[nyomvonal_id]
        ,uhh.[MAX]
    INTO                      #nyomvon_tol_ig
    FROM [nyomvon_tol_ig]  AS uhh;


It seems that SA tries to align the table name given to INTO with the rest of the table aliases in the FROM part. Is this by design?
Mon May 03, 2021 8:05 am View user's profile Send private message
Mindflux



Joined: 25 May 2013
Posts: 804
Country: United States

Post Reply with quote
Can confirm mine does it. The only way to 'beautify' it is to drop the alias off the SELECT table name, then the into and select table names align, since you cannot alias the into table name.
Mon May 03, 2021 9:29 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
I don't think this is by design. Most likely a regression from some other change. I see couple of several updates in 11.5 version related to code formatting, with one of them related to handling of INTO clause, which was triggered by this change https://www.softtreetech.com/support/phpBB2/viewtopic.php?t=25538&highlight=column1
Mon May 03, 2021 10:48 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.