Refresh an open table in SSMS

  • This has got to be an easy solution I tried F5 and it doesn`t seem to work. Say I have two tables open and a query window open. I write an update query that changes the tables I am viewing, and they just stay the same. I have to close them then find them again in the list and open them to see the changes. Isn`t there a refresh button?

    Even Access has a refresh button, infact I'm pretty sure it refreshes dynamically. This is a really annoying thing that has bothered me for some time and I just never got around to asking about it.

  • Look for a button that looks like an Exclamation point.. Try that.. It re-runs the query that populates the window.

    CEWII

  • There is no exclamation mark. This is a view of a table not a query. I know in SQL Management studio 2008 the view into a table is actaully a query returning the last 'X' rows and so maybe that works like a normal query and you get the option to rerun the query to view that table, but I am using SSMS 2005, and when I click on the tab to switch to the table contents I lose all buttons that I have when I click on a tab where I can write queries.

  • Then perhaps I don't understand what you are doing..

    Are you openning a table or a view for edit or for viewing?

    Please describe what you did to get the data up on screen..

    CEWII

  • Ok, ya I'm probably not being too terriblely clear here. I have two tabs open. One is just the standard SQLQuery tab where I am writing my query to modify the table contents, the other is an opened table tab I got to by using the summary tab and navigating through the database to my table and then right clicking on it and choosing 'Open Table'.

    So in my case I would press F7 to get the summary tab to show, then navigate to my table by MyDataBase > Tables > MyTable.

  • You could just add select * from myTable to your open query window. 😉

    In my experience the open table UI does not work very well. It is an editable grid that can sometimes cause data corruption.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sean Lange (12/22/2010)


    You could just add select * from myTable to your open query window. 😉

    Thanks, but I was just hoping there was something like MS Access uses, its quite handy, lets you deal with objects separately. Its much easier to flip back and forth.

  • You could just have another tab with the query and switch back to it. I guess it is a preference thing but i am not a big fan of switching back and forth. If it is all in one window I can keep my hands on the keys where they belong and off the mouse. 😛

    I don't think there is anything in SSMS that behaves like the window you are talking about in Access.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • loki1049 (12/22/2010)


    Sean Lange (12/22/2010)


    You could just add select * from myTable to your open query window. 😉

    Thanks, but I was just hoping there was something like MS Access uses, its quite handy, lets you deal with objects separately. Its much easier to flip back and forth.

    Try the shortcut Ctrl + R. This will re-run the query in your Open Table window.


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • loki1049 (12/22/2010)


    Ok, ya I'm probably not being too terriblely clear here. I have two tabs open. One is just the standard SQLQuery tab where I am writing my query to modify the table contents, the other is an opened table tab I got to by using the summary tab and navigating through the database to my table and then right clicking on it and choosing 'Open Table'.

    So in my case I would press F7 to get the summary tab to show, then navigate to my table by MyDataBase > Tables > MyTable.

    The summary tab was removed in a later service pack to the client tools. The fact that you still have that summary tab tells me that you have not upgraded your client tools.

    If the instance you are connecting to is at SP2 or greater - this can cause you lots of problems. There have been quite a few updates to the client tools since then.

    Either way, I would recommend upgrading to at least SP3 (SP4 has just been released - if possible, that is the one you should apply) if possible.

    When you have the table open - there should be a tool bar available that has several buttons. One of those buttons is marked with SQL which can be clicked to show the actual SQL statement being executed. Near that button is your refresh button - and if you don't see that tool bar then you probably removed it at some point.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

  • loki1049 (12/22/2010)


    There is no exclamation mark. This is a view of a table not a query. I know in SQL Management studio 2008 the view into a table is actaully a query returning the last 'X' rows and so maybe that works like a normal query and you get the option to rerun the query to view that table, but I am using SSMS 2005, and when I click on the tab to switch to the table contents I lose all buttons that I have when I click on a tab where I can write queries.

    Maybe you can adjust your toolbar settings.

    Are you opening the table by "right click" -> "open table" ?

    If so, "Right click" -> "execute sql"

    This is not really a good way to look at data though. You run the risk of updating, and when you open, you are selecting all records, which can be bad.

    Better to work in a query window.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply