Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Extract SQL Queries

Author  Topic 

eVOD
Starting Member

1 Post

Posted - 2008-02-06 : 03:59:38
Hi All,

I am looking to extract all the queries from a table in sql to either excel or office.

I have used SELECT Qstring FROM OUQR to list them but now i have to copy each one individually and the paste them to another document.

Is there a better way to go about doing this....

Thanks for the help....

Cheers

PeterNeo
Constraint Violating Yak Guru

357 Posts

Posted - 2008-02-06 : 04:05:15
Check the link describing how to import-export to excel

http://sql-server-performance.com/Community/forums/t/12221.aspx
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-06 : 04:12:00
You can use DTS to export the table data to excel.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-06 : 07:51:19
or refer http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-02-06 : 08:39:13
Or if you are using SQL 2005, just change your results pane to text (ctrl-T) and then save the results as a .rpt file.

You can then open this in Excel and it will have the headers.
Go to Top of Page
   

- Advertisement -