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.
| Author |
Topic |
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2008-08-07 : 11:23:04
|
| How to EXPORT QUERY TO EXCEL via select query.Select * from Tab_myOrders where ord_key='34'Thank you very much for the info. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-07 : 11:27:15
|
| Use OPENROWSET or SSIS Export/import task |
 |
|
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2008-08-07 : 13:07:30
|
Hello Visakh,When used the following getting an error i am using sql 2005:insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\testing.xls;', 'SELECT * FROM [SheetName$]') select * from TAB_ccsNetPickLists where fieldlabelkey='lblsubject'Msg 15281, Level 16, State 1, Line 1SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online. Thank you very much.quote: Originally posted by visakh16 Use OPENROWSET or SSIS Export/import task
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-07 : 13:12:23
|
| Go to your sql server's surface area configuration manager and select checkbox for OPENROWSET (bt default it will be disabled). |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-08-07 : 13:28:06
|
| Why don't you use simple Import/Export Wizard.You can put your query over there as well. |
 |
|
|
|
|
|