Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-11-21
4
Medium Priority
?
997 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Assisted Solution

by:Otana
Otana earned 800 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 1200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

650 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