How can we help you today? How can we help you today?

Order of fields in intellisense

I notice the default when you do a SELECT is to show the fields ordered by field names across all tables. I think for my purposes it would be more useful to be able to grab fields by tablename first.

The primary goal of prompt being to help me find fields, if I'm unfamiliar with what is on the customer table, I would be typing SELECT Customer.[field], not just "knowing" to look for [field].

The default view is fine and all, just be nice to see fields grouped/ordered by table name as an option.
eswise
0

Comments

4 comments

  • Bart Read
    Hi there,


    We'll actually support that {TableName}.{ColumnName} approach in the final release, and also provide a column picker which will be accessible as the top item in the candidate list.

    However, the reason it works the way it does at the moment is that we wanted to allow people to enter a query in the most natural way possible. I think quite a lot of comment has been made on the "backwards" nature of SQL and how that makes Intellisense a bit tricky to do, however if you are reasonably familiary with the schema you can enter the column names, and you'll notice that the rest of the columns from that table/view will appear at the top of the candidate list, making them easier to select. This also works if you're SELECTing from multiple tables/views.

    As I say though, for the final release we will support other approaches. We sat down and discussed this for ages and eventually somebody suggested just allowing users to select from *all* the columns, and then pull the other columns from the relevant tables/views to the top of the list as the query was built up. A somewhat different way of doing it to other approaches I've seen, but worth giving it a go.

    I suspect what we might do is make this an option so that if having all the columns really winds you up, as it might do, then you can choose to specify a table name first.


    Thanks,
    Bart Read
    0
  • eswise
    The reason it was getting to me was because I opened up a "very bad" database that I am supporting. We're talking over 420 tables with only probably about 70 in use (many are temp tables that they never cleaned up but some actually are in use and the app is all ad-hoc sql in the application so it's difficult to tell whether dropping these tables will bust it or not... hence we haven't cleaned it up yet)

    Anyways, being unfamiliar with the schema and pulling that many fields was a bit of a mindshock. You can call the table sort option "This is a crappy undocumented database" feature.

    Come to think of it though, it'd be great if it would let you type your sql like it is executed and then reformat it. ie FROM <table1> inner join <table2> where blah select blah blah blah
    eswise
    0
  • Lionel
    The column picker should hopefully help you in navigateing through this database. The idea is that you will be able to explorer the tables and see what columns are in each table. You should then be able to select the columns that you are interested in and have them added to the select list.

    Lionel
    Lionel
    0
  • Bart Read
    eswise wrote:
    Anyways, being unfamiliar with the schema and pulling that many fields was a bit of a mindshock. You can call the table sort option "This is a crappy undocumented database" feature.

    ROFL. Sounds like production code to me. As Lionel's said, hopefully the column picker should sort you out in that situation.
    Bart Read
    0

Add comment

Please sign in to leave a comment.