By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,631 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,631 IT Pros & Developers. It's quick & easy.

Export the Data from Sql to Excel sheet used DTS

P: 1
Hi Friends,

In my project i need to Export the Data from Sql server to Excel Sheet.
It should be auto schedulder certain intervals(months). i want to store the Excel sheet in .CSV format to the Particular Location. Before store the Data it should be checked whether the fils is exist or not. These all the things should be happen in Sqlserver side without using any UI( Asp or asp. net or VB).
Please send me the query or Steps to acheive or SP)


Regards.
sankar P T
Aug 8 '07 #1
Share this Question
Share on Google+
2 Replies


Jim Doherty
Expert 100+
P: 897
Hi Friends,

In my project i need to Export the Data from Sql server to Excel Sheet.
It should be auto schedulder certain intervals(months). i want to store the Excel sheet in .CSV format to the Particular Location. Before store the Data it should be checked whether the fils is exist or not. These all the things should be happen in Sqlserver side without using any UI( Asp or asp. net or VB).
Please send me the query or Steps to acheive or SP)


Regards.
sankar P T
One simple method for you to look at as an alternative which you might want to schedule as a job as part of a sproc if it helps

Expand|Select|Wrap|Line Numbers
  1. sp_makewebtask @outputfile = 'c:\yourfilename.csv', 
  2.   @query = 'Select * from yourqueryname', 
  3.   @colheaders =1, 
  4.     @FixedFont=0,@lastupdated=0,@resultstitle='Title for your ProjectData', 
  5.   @dbname ='YourSQLServerDatabasename' 
Aug 26 '07 #2

azimmer
Expert 100+
P: 200
Hi Friends,

In my project i need to Export the Data from Sql server to Excel Sheet.
It should be auto schedulder certain intervals(months). i want to store the Excel sheet in .CSV format to the Particular Location. Before store the Data it should be checked whether the fils is exist or not. These all the things should be happen in Sqlserver side without using any UI( Asp or asp. net or VB).
Please send me the query or Steps to acheive or SP)


Regards.
sankar P T
Create an export package with the DTS Import/Export Wizard and at the end save and schedule it for periodic execution. The wizard is straightforward to use but should you need assistance this is a beginner's step-by-step guide: http://articles.techrepublic.com.com/5100-1035_11-1043668.html
Aug 26 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.