SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Manipulating Results before exporting.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Oskoss
Starting Member

1 Posts

Posted - 06/11/2012 :  09:44:46  Show Profile  Reply with Quote
As the title states, I have a table that has multiple columns. A few of the columns I want to just export what is in each (which I can do), but I want to know if there is a way to use the sql functions such as SUM and COUNT on a column and then export the results. How would I go about doing that?

Thanks for any help!

webfred
Flowing Fount of Yak Knowledge

Germany
8529 Posts

Posted - 06/11/2012 :  10:20:08  Show Profile  Visit webfred's Homepage  Reply with Quote
Then the source of your export has to be a SELECT statement or a VIEW with the needed result set.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
48119 Posts

Posted - 06/11/2012 :  15:18:09  Show Profile  Reply with Quote
quote:
Originally posted by Oskoss

As the title states, I have a table that has multiple columns. A few of the columns I want to just export what is in each (which I can do), but I want to know if there is a way to use the sql functions such as SUM and COUNT on a column and then export the results. How would I go about doing that?

Thanks for any help!


you can either use sql statement with GROUP BY and SUM,COUNT as your source or you can bring data from table and do aggregation during export using ssis packages. I would prefer first method as its best to do it before export itself if you're sure you want only aggregated data.

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

Go to Top of Page

wendyss
Starting Member

China
4 Posts

Posted - 06/11/2012 :  22:16:36  Show Profile  Reply with Quote
I would prefer first method as its best to do it before export itself if you're sure you want only aggregated data.


----------------------------------------------------------------------------------------------------------------------------------------
[url=http://www.rchelicopterus.com/]Rc Helicopter Parts[/url]|[url=http://minirchelicopter-reviews.com/]Mini Rc Helicopter[/url]|[url=http://rc-helicopters-reviews.com/]Rc Helicopters Reviews[/url]|[url=http://www.rchobbyforsale.com/]Rc Hobby[/url]

liuli wendys
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000