
ALIAS options are great
ALIAS options are great
I love the alias option in SQL Complete. I especially want to thank you for the option to remove prefixes for tables. I'd been having problems where my app_submission table was getting named the reserved word "as" which was driving me crazy. I almost posted a topic until I noticed that prefixes can be removed. Now I'm in heaven 

Yes, you can find the following options to tune the alias generation behaviour:
- Generate alias on commit;
- Automatically generate AS clause
- Exclude following name prefixes;
- Exclude following names;
If generated alias is the same as a keyword, SQL Complete will quote it. Was it the wrong behaviour for you? Should SQL Complete add an extra symbol (digit) to the generated alias to avoid quotation, for example [as] -> as1?
- Generate alias on commit;
- Automatically generate AS clause
- Exclude following name prefixes;
- Exclude following names;
If generated alias is the same as a keyword, SQL Complete will quote it. Was it the wrong behaviour for you? Should SQL Complete add an extra symbol (digit) to the generated alias to avoid quotation, for example [as] -> as1?
The field did get bracketed sort-of. So, it came out as:
So where the AS clause was defined it didn't use brackets, but in the join and later it did. I do think my preference would be to add a 1 at the end (ex. as1) instead of the brackets. It drives me crazy using brackets when typing aliases or field names.
I'm also now noticing the prefix exclusions seem to get lost when I close Enterprise Manager. I just discovered it yesterday, so I haven't troubleshot it in any way, may start a new thread if it's really a problem, and not something I'm doing wrong.
Code: Select all
SELECT
*
FROM
app_in AS ai
INNER JOIN app_Sub AS as ON ai.id = [as].id
I'm also now noticing the prefix exclusions seem to get lost when I close Enterprise Manager. I just discovered it yesterday, so I haven't troubleshot it in any way, may start a new thread if it's really a problem, and not something I'm doing wrong.
I've added this suggestion to our development plan.tlbignerd wrote:... I do think my preference would be to add a 1 at the end (ex. as1) instead of the brackets. ...
Yes, it's a bug. We'll fix it in one of the next builds of SQL Complete. I'll notify you as soon as the build with the fix is available to download.tlbignerd wrote:I'm also now noticing the prefix exclusions seem to get lost when I close Enterprise Manager. ...
Sorry for the inconvenience.