Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 export to csv and compress it

Author  Topic 

mleek68
Starting Member

4 Posts

Posted - 2011-12-16 : 12:49:40
Hi Guys,
Need to export a query to csv then compress it and email it.

The export-to-csv part in ssis works fine but it needs to be compressed and emailed.. i'm stuck at the last part.. does anyone have any suggestions on how the solve this issue?

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-16 : 12:52:21
Do you have a command line compression tool installed?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-16 : 13:23:41
you can make use of j# class methods to do the zipping inside a script task

see

http://microsoft-ssis.blogspot.com/2011/01/zip-sourcefile-to-archive.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

mleek68
Starting Member

4 Posts

Posted - 2011-12-16 : 13:35:01
Yep, we use 7zip.

quote:
Originally posted by mleek68

Hi Guys,
Need to export a query to csv then compress it and email it.

The export-to-csv part in ssis works fine but it needs to be compressed and emailed.. i'm stuck at the last part.. does anyone have any suggestions on how the solve this issue?

Thanks

Go to Top of Page

mleek68
Starting Member

4 Posts

Posted - 2011-12-16 : 13:36:58
thanks, will look into that one

quote:
Originally posted by visakh16

you can make use of j# class methods to do the zipping inside a script task

see

http://microsoft-ssis.blogspot.com/2011/01/zip-sourcefile-to-archive.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-12-16 : 13:48:49
just curious...how many rows is this?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

mleek68
Starting Member

4 Posts

Posted - 2011-12-16 : 15:06:05
Hi Brett,

59661rows(not much), size 11Mb (too much to deliver by email)

quote:
Originally posted by X002548

just curious...how many rows is this?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/




Go to Top of Page
   

- Advertisement -