Solved

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

Posted on 2007-11-21
4
990 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

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 …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

864 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now