Home All Groups Group Topic Archive Search About

SSMS Open Table Include Column Headers



Author
19 Dec 2008 5:29 AM
NB
Ok, I  know how to include headers when copying a result set from a query
window.  But if I right-click on a table and click "Open Table", then see the
results in the grid window and copy those results to Excel, how can I get
columns included (without jumping through a bunch of hoops!).

Thanks.

Author
19 Dec 2008 5:43 AM
Aaron Bertrand [SQL Server MVP]
What is wrong with using a query window?  Do you really need Open Table?


On 12/19/08 12:29 AM, in article
2569B781-A676-47EB-86C3-DEE559B06***@microsoft.com, "NB"
<N*@discussions.microsoft.com> wrote:

Show quoteHide quote
> Ok, I  know how to include headers when copying a result set from a query
> window.  But if I right-click on a table and click "Open Table", then see the
> results in the grid window and copy those results to Excel, how can I get
> columns included (without jumping through a bunch of hoops!).
>
> Thanks.
Are all your drivers up to date? click for free checkup

Author
19 Dec 2008 5:54 AM
NB
Often, I'll need to make quick changes to the data in grid format, then copy
it and paste it to Excel.  So how can I do it with headers?

Show quoteHide quote
"Aaron Bertrand [SQL Server MVP]" wrote:

> What is wrong with using a query window?  Do you really need Open Table?
>
>
> On 12/19/08 12:29 AM, in article
> 2569B781-A676-47EB-86C3-DEE559B06***@microsoft.com, "NB"
> <N*@discussions.microsoft.com> wrote:
>
> > Ok, I  know how to include headers when copying a result set from a query
> > window.  But if I right-click on a table and click "Open Table", then see the
> > results in the grid window and copy those results to Excel, how can I get
> > columns included (without jumping through a bunch of hoops!).
> >
> > Thanks.
>
>
Author
21 Dec 2008 3:32 PM
Dan Guzman
> Often, I'll need to make quick changes to the data in grid format, then
> copy
> it and paste it to Excel.  So how can I do it with headers?

Instead of Open Table, run the query with results to grid.  You can include
column headers when copying those results by checking the corresponding
option under Query-->Query Options-->Results-->Grid.  The default behavior
is specified under Tools-->Options.

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

Show quoteHide quote
"NB" <N*@discussions.microsoft.com> wrote in message
news:F3B4E0E0-89B0-49D0-BCD3-8924826F9D2F@microsoft.com...
> Often, I'll need to make quick changes to the data in grid format, then
> copy
> it and paste it to Excel.  So how can I do it with headers?
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>
>> What is wrong with using a query window?  Do you really need Open Table?
>>
>>
>> On 12/19/08 12:29 AM, in article
>> 2569B781-A676-47EB-86C3-DEE559B06***@microsoft.com, "NB"
>> <N*@discussions.microsoft.com> wrote:
>>
>> > Ok, I  know how to include headers when copying a result set from a
>> > query
>> > window.  But if I right-click on a table and click "Open Table", then
>> > see the
>> > results in the grid window and copy those results to Excel, how can I
>> > get
>> > columns included (without jumping through a bunch of hoops!).
>> >
>> > Thanks.
>>
>>
Author
21 Dec 2008 5:28 PM
NB
>> Instead of Open Table, run the query with results to grid.

As I said in my original post "Ok, I  know how to include headers when
copying a result set from a query window."  So, are we saying that it's
impossible to copy headers from an "Open Table"?

Show quoteHide quote
"Dan Guzman" wrote:

> > Often, I'll need to make quick changes to the data in grid format, then
> > copy
> > it and paste it to Excel.  So how can I do it with headers?
>
> Instead of Open Table, run the query with results to grid.  You can include
> column headers when copying those results by checking the corresponding
> option under Query-->Query Options-->Results-->Grid.  The default behavior
> is specified under Tools-->Options.
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
> http://weblogs.sqlteam.com/dang/
>
> "NB" <N*@discussions.microsoft.com> wrote in message
> news:F3B4E0E0-89B0-49D0-BCD3-8924826F9D2F@microsoft.com...
> > Often, I'll need to make quick changes to the data in grid format, then
> > copy
> > it and paste it to Excel.  So how can I do it with headers?
> >
> > "Aaron Bertrand [SQL Server MVP]" wrote:
> >
> >> What is wrong with using a query window?  Do you really need Open Table?
> >>
> >>
> >> On 12/19/08 12:29 AM, in article
> >> 2569B781-A676-47EB-86C3-DEE559B06***@microsoft.com, "NB"
> >> <N*@discussions.microsoft.com> wrote:
> >>
> >> > Ok, I  know how to include headers when copying a result set from a
> >> > query
> >> > window.  But if I right-click on a table and click "Open Table", then
> >> > see the
> >> > results in the grid window and copy those results to Excel, how can I
> >> > get
> >> > columns included (without jumping through a bunch of hoops!).
> >> >
> >> > Thanks.
> >>
> >>
>
>

Bookmark and Share