Previously, SQL Prompt preserved the the omission of `AS` on object aliases, however, as of this morning it has started adding it. As a simple example If I had the SQL below:
Previously it would have simply added the semicolon, as I prefer to not use AS when aliasing an object (although i do for columns).
I haven't performed an update to Prompt this morning, and I'm running the latest version, so not sure why the behaviour has suddenly changed. I had a look at the style options, and there's nothing to enable (or disable) he use of AS for object aliasing.
Any ideas why this has changed and how to revert the behaviour?
Comments
4 comments
-
Hi @Thom_A,
I don't think there is a way for it to have just reverted. The aliases are controlled by a section outside the "Styles" bit in "SQL Prompt Options > Inserted code > Aliases":
Has the "Include AS in alias definition" checkbox been checked?
I believe this could have happened if you imported a .sqlpromptsettings file perhaps.
Kind regards,
Alex -
Hi @Alex B I don't make use of the Aliases page in the SQL Prompt Options:
-
Hi @Thom_A,
Apologies, I've muddled it - the section I put before is for when you are typing.
The AS being included during formatting is handled by this section on the SQL Prompt menu > Options > Format >Styles menu:
If you uncheck that it should stop adding this during formatting!
Kind regards,
Alex -
Thanks Alex. It was set to "Remove", however, I changed the option to Add, saved, and then changed it back and it fixed the problem. Guessing there was a setting error somewhere and rewriting the settings fixed it.Thanks.
Add comment
Please sign in to leave a comment.