SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Configure Automatically Add Alias

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Configure Automatically Add Alias
Author Message
bradd



Joined: 10 Jun 2008
Posts: 4
Country: United States

Post Configure Automatically Add Alias Reply with quote
Many of the tables in our databases are contain a prefix such as tblCustomer, tblProduct. When I write my select with the automatically add alias option on I get the following.

Code:
SELECT *
FROM tblCustomer tc



Ideally, I would like to configure the automatic alias function to not consider the prefix tbl. Therefore easily creating the following.

Code:
SELECT *
FROM tblCustomer c


Is this possible?

Thanks in advance!
Wed Oct 01, 2008 4:16 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Sorry, that is not currently possible. However, you can always change the added alias manually or you can set SQL Assistant not to add table alias automatically.

Alternatively you can also create code snippets that use either generic aliases or create table specific code snippets, for example add a snipped named "sc" with the query referenced in your post. You can then enter the code as "sc[Ctrl+Enter]" and it will insert


Code:
SELECT *
FROM tblCustomer c


By [Ctrl+Enter] I meant Ctrl+Enter hotkey. In fact this method of coding is much more efficient then typing full SELECT statement even using SQL Assistant prompts for keywords and object name.

Lastly, it is more efficient to choose table name in the popup appearing right after the SELECT keyword, then to type the full SELECT * FROM then pick the table.
Wed Oct 01, 2008 4:49 pm View user's profile Send private message
bradd



Joined: 10 Jun 2008
Posts: 4
Country: United States

Post Reply with quote
Any possibilty of adding this capability in the future?

Also, I use a snippnet "ssf" to generate my Select * From x already ;p. Although, I will use the select [Tab] when I want the full select list.
Wed Oct 01, 2008 6:23 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Please take a look at the Macro-variables section in the on-line help and the example snippets using $COLUMS$ and similar macros. This way you can generate complete dynamic blocks of code for your tables, even entire stored procedures. For example a single snippet can be used to generate complete set of "get", "insert", "update", "list" procedures for an arbitrary table in one go, including comments, parameters, variables, complete SQL statements, everything...
Wed Oct 01, 2008 6:29 pm 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.