Thursday, March 8, 2012

Copying data from Query Analyser.

When copying data from QA, is it possible to copy the headers with the data?
I tried Select All then Copy but got just the data.
Regards
Thief_did you hear "Thief_" <thief_@.hotmail.com> say in
news:ODKOU6jwFHA.2656@.TK2MSFTNGP09.phx.gbl:

> When copying data from QA, is it possible to copy the headers with the
> data? I tried Select All then Copy but got just the data.
> Regards
> Thief_
>
if we're talking about column headers with the data, if you are querying
using grid view that's the best you can get. If you switch to text view
or send the results to a file (CSV or text) you will get the column
headings.
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs|||Hi ,

>From QA u will not be able to get the header name but if u tranfer ur
data to text file or excel file or access file u can get the table name
as well as the table structure.
HTH
from
Doller
Neil MacMurchy wrote:
> did you hear "Thief_" <thief_@.hotmail.com> say in
> news:ODKOU6jwFHA.2656@.TK2MSFTNGP09.phx.gbl:
>
> if we're talking about column headers with the data, if you are querying
> using grid view that's the best you can get. If you switch to text view
> or send the results to a file (CSV or text) you will get the column
> headings.
> --
> Neil MacMurchy
> http://spaces.msn.com/members/neilmacmurchy
> http://spaces.msn.com/members/mctblogs|||doller wrote:
> Hi ,
>
> data to text file or excel file or access file u can get the table name
> as well as the table structure.
> HTH
> from
> Doller
>
> Neil MacMurchy wrote:
>
If you use SQL Server Management Studio (Which is the "query analyzer"
that comes with SQL 2005), you can actually choose to include Column
Headers when you copy data from QA.
Regards
STeen|||did you hear "doller" <sufianarif@.gmail.com> say in
news:1127707753.325611.236790@.g43g2000cwa.googlegroups.com:

> Hi ,
>
> data to text file or excel file or access file u can get the table name
> as well as the table structure.
> HTH
> from
> Doller
I think we need to clear up the term 'header'. Are we speaking of column
headings? if we are choose "results in text" from the query menu in QA.
this will allow the full columns to be selected for editing (copy/paste)or
a report saved to a file. You can also choose the "results to file" option
to save the output to a csv file. you made need to modify the options for
your results to get them in the format you would like, but these can be
chosen from tools --> option --> results (for more details check "Managing
SQL Query Analyzer Windows" from books online).
the other type of header might be in reference to a backup. perhaps this
was in reference to extend properties of a database (the
fn_listextendedproperties), but my guess is that this is what I have
mentioned above.
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs|||did you hear "Steen Persson (DK)" <spe@.REMOVEdatea.dk> say in news:
#HoIwUnwFHA.3740@.TK2MSFTNGP14.phx.gbl:

> If you use SQL Server Management Studio (Which is the "query analyzer"
> that comes with SQL 2005), you can actually choose to include Column
> Headers when you copy data from QA.
>
you can do that in 2000 as well. just don't do a "select *" ;)
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs|||Neil MacMurchy wrote:
> did you hear "Steen Persson (DK)" <spe@.REMOVEdatea.dk> say in news:
> #HoIwUnwFHA.3740@.TK2MSFTNGP14.phx.gbl:
>
> you can do that in 2000 as well. just don't do a "select *" ;)
>
Where can you specify that in Query Analyzer?
Regards
Steen|||did you hear "Steen Persson (DK)" <spe@.REMOVEdatea.dk> say in
news:urWES4zwFHA.904@.tk2msftngp13.phx.gbl:

> Where can you specify that in Query Analyzer?
select col1, col2, col3...
(it was a joke buddy...)
Neil MacMurchy
http://spaces.msn.com/members/neilmacmurchy
http://spaces.msn.com/members/mctblogs

No comments:

Post a Comment