[Solved] Formatting for the "AS"

4 Posts
3 Users
0 Reactions
1,018 Views
Posts: 1
Topic starter
(@pettythug)
Member
Joined: 3 years ago
[#91]

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;

3 Replies
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

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


1 Reply
 hpwn
(@hpwn)
Joined: 2 years ago

Member
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
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

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: