Solved

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

Posted on 2007-11-21
4
989 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
Comment Utility
- 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
Comment Utility
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
Comment Utility
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
Comment Utility
ok, i figured how to do it nicely now :)

thx all
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

762 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

6 Experts available now in Live!

Get 1:1 Help Now