 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.5.362 Pro] - Formatting INTO (SQL Server) |
|
When formatting this code
 |
 |
SELECT uhh.[nyomvonal_id]
,uhh.[MAX]
INTO #nyomvon_tol_ig
FROM [nyomvon_tol_ig] AS uhh
;
|
using this rule for SELECT
 |
 |
SELECT ... AS ...
,... = ...
INTO ...
FROM ... AS ...
,...
JOIN ... ON ... = ... AND ... OR ...
WHERE ... = ...
AND ...
OR ...
GROUP BY ...
,...
HAVING ...
,...
ORDER BY ...
,...;
|
it gets formatted like this
 |
 |
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 |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
Mon May 03, 2021 10:48 am |
|
 |
|
|
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
|
|
|