[Solved] Formatting for the "AS"

4 Posts
3 Users
0 Likes
202 Views
(@pettythug)
Member
Joined: 1 year ago
Posts: 1
Topic starter  

I was wandering how, if there is a way, to format the "AS" when labeling a derived name. Thanks. 

Select table AS renamed_table
FROM schema AS renamed_schema;

   
Guido
(@admin)
Member Admin
Joined: 2 years ago
Posts: 175
 

Hi @pettythug,

thanks for your feedback. There is no special formatting for the "AS" except that you can align all "AS" when there are more than one consecutive "AS"  in your SELECT statement

 

grafik

Regards

Guido


   
 hpwn
(@hpwn)
Member
Joined: 2 months ago
Posts: 5
 

@admin I was surprised to see, that the 'AS' are mixed between 'fieldlist' and 'from part' and that the alligning is interrupted by splitted lines

example (profile attached)

SELECT t1.id  AS id
  , t1.field1 AS name
  , substring( COALESCE( t1.field2, '' ), 1, LENGTH( t1.field2 ) -
  LENGTH( 'street' ) ) AS street
FROM TABLE             AS t1

   
Guido
(@admin)
Member Admin
Joined: 2 years ago
Posts: 175
 

Hello @hpwn, yes, you are right. This is how it is currently designed. Sometimes this looks really nice and sometimes it does not look perfect. I am still looking for a better design. Will think about it.

Thanks for your feedback

Guido


   
Share: