SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Automatically add "AS" before table alias

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Automatically add "AS" before table alias
Author Message
lis_s



Joined: 14 Mar 2013
Posts: 2
Country: Russian Federation

Post Automatically add "AS" before table alias Reply with quote
Hi all!

Is there any way to tell SA to put "AS" before aliases?

For example:
I need the following query

Code:

select * from MyTable


to be formatted like this

Code:

select * from MyTable as mt

Thu Mar 14, 2013 10:43 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Options dialog -> DB Options table -> select SQL Assistance type on the left -> Expand Auto complete ... section on the right. -> Auto Add Aliases from "Yes" to "Yes (with AS keyword)" -> click OK button
Thu Mar 14, 2013 10:38 pm View user's profile Send private message
lis_s



Joined: 14 Mar 2013
Posts: 2
Country: Russian Federation

Post Reply with quote
SysOp wrote:
Options dialog -> DB Options table -> select SQL Assistance type on the left -> Expand Auto complete ... section on the right. -> Auto Add Aliases from "Yes" to "Yes (with AS keyword)" -> click OK button


Thanks a lot!
Fri Mar 15, 2013 1:20 am View user's profile Send private message
Olegon



Joined: 07 Sep 2009
Posts: 40

Post Reply with quote
Doesn't work with joins :(

Example:
Code:
select
  *
from
  dbo.Contractors as c
  inner join dbo.Banks b
    on
      b.contractor_rid = c.record_id


After I wrote "inner join" I chose table name from the joins list. Table alias added without "as".
Thu Apr 04, 2013 7:28 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Thank you. I will log this issue to our support system
Thu Apr 04, 2013 8:01 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post Reply with quote
Olegon wrote:
Doesn't work with joins :(

Example:
Code:
select
  *
from
  dbo.Contractors as c
  inner join dbo.Banks b
    on
      b.contractor_rid = c.record_id


After I wrote "inner join" I chose table name from the joins list. Table alias added without "as".


Strange indeed. It works properly when selecting the table from joins list but fails when selecting the join condition.
Thu Apr 04, 2013 8:28 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.