Solved

MSSQL 2000 - Convert table to csv and send as email attachment

Posted on 2007-11-21
4
993 Views
Last Modified: 2009-12-16
Hi All,

how can i add a schedule job in MSSQL 2000, so that it can automatically convert a table into csv, and send csv file as an email attachment every week?

thanks a lot!
0
Comment
Question by:orbulat
  • 2
4 Comments
 
LVL 11

Assisted Solution

by:Otana
Otana earned 200 total points
ID: 20333123
- Create a DTS package, in which you export your table to a csv file (with a data transform task).
- mail the file (Not sure how to do this exactly, you could use SQL mail)
- Schedule the package (right-click on it, schedule package)
0
 
LVL 31

Accepted Solution

by:
James Murrell earned 300 total points
ID: 20333142
ok i think this could be done

1) open enterprise manager
2) right click on the database you want to export, and select all tasks/export data
3) the wizard opens.  click "Next"
4) accept the datasource as is, or select the datasource you want to export to excel.
5) change the destination to Microsoft Excel (and the version you want). also select the file you want to export to.
6) click next, then choose "copy tables..." and click next
7) select the tables and click next
8) make sure "run immediately" is the only option selected and click next
9)click finish and it will be done.


then takie a look at http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/DTS/Q_22826796.html?sfQueryTermInfo=1+email+send+sql

if you schedule both jobs should do it
0
 
LVL 10

Author Comment

by:orbulat
ID: 20333313
thanks all

i could export the table into a csv,

but i couldn't do it in "DTS package" nor the email stuff, any ideas?

i am new to use these functions, is there a way which i can 1. export to csv (csv name based on the date), 2. send mail with that csv as attachment at one time?

0
 
LVL 10

Author Comment

by:orbulat
ID: 20337050
ok, i figured how to do it nicely now :)

thx all
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
unable to reinstall SCVMM 2012 R2 - SQL errors. 5 43
SQL Query Task 11 44
disk usage reporting tools 27 57
T-SQL: problem comparing datetime 4 51
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question