 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
bradd
Joined: 10 Jun 2008 Posts: 4 Country: United States |
|
Configure Automatically Add Alias |
|
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.
 |
 |
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.
 |
 |
SELECT *
FROM tblCustomer c |
Is this possible?
Thanks in advance!
|
|
Wed Oct 01, 2008 4:16 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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
 |
 |
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 |
|
 |
bradd
Joined: 10 Jun 2008 Posts: 4 Country: United States |
|
|
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
|
|
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
|
|
|