Comments
7 comments
-
Thanks Marc,
You're right: that isn't terribly clever. Fortunately it's also quite easy to fix. Again, just something we missed in order to get the beta out.
I guess in order to allow you to tune the alias generation we could add lists that would cause SQL Prompt to ignore user-defined prefixes or suffixes when generating aliases.
So for example you could set it up in the options dialog to ignore prefixes such as "T_", "V_" etc.
Would this do the trick? If so we'll try to get something in for the final release.
Thanks,
Bart -
Bart Read wrote:So for example you could set it up in the options dialog to ignore prefixes such as "T_", "V_" etc.
Would this do the trick?
Even better would be a way to specify manually, on a table-by-table (and view-by-view) basis, what prefixes to use. Fill those in with your best guess, but allow me to change them where appropriate and needed.
Thanks!
Marc -
While it would be nice to specify alias on a per table/view basis, this is not yet sufficient: suppose that I want to join a table with itself. Then I would expect the tool to provide me with two different alias names (like myalias and myalias2, for instance...)
Just my 2 cents,
Emmanuel -
nanchen wrote:While it would be nice to specify alias on a per table/view basis, this is not yet sufficient: suppose that I want to join a table with itself. Then I would expect the tool to provide me with two different alias names (like myalias and myalias2, for instance...)
Marc -
Hmm... self-joins. Interesting. :shock:
-
Hmm... self-joins. Interesting
You *do* like a good challenge, don't you? :lol:
Marc -
8)
Add comment
Please sign in to leave a comment.
I started with this query:
select * from [dbo].[T_Contract] AS tc
and then added
inner join [dbo].[T_Checklist]
and SQL Prompt added "as tc" for the alias. Sorry, that alias is already taken!
Also, since all our tables are prefixed with a "T_", SQL Prompt tends to suggest awfully similar table aliases over and over. It would be nice to be able to specify the algorithm how to suggest the table alias - e.g. let me tell SQL Prompt to ignore the first x characters of a table name, or even better, let me define a list of table aliases for a given database and store that; if I specified a table alias myself, use that, and only resort to "guessing" a table alias if you don't have a specific assignment by me.